<template>
    <div class="planProduction-production" :style="{height:currentRow.rightPreviewBoxH?currentRow.rightPreviewBoxH+'px':(currentRow.isTopTabs?'calc(100vh - 174px)':'calc(100vh - 119px)')}" :key="planProductionProductionKey">
        <div class="process-handling-card">
            <a-tabs type="card" v-model:activeKey="activeKey" @change="tabPaneChange" v-if="!currentRow.isTopTabs">
                <!-- <a-tab-pane key="人员选派" tab="人员选派"></a-tab-pane> -->
                <a-tab-pane key="审评方案拟定" tab="审评方案拟定"></a-tab-pane>
                <!-- <a-tab-pane key="方案制定" tab="审评方案"></a-tab-pane>
                <a-tab-pane key="通知材料制作" tab="通知材料制作"></a-tab-pane>
                <a-tab-pane key="材料审查" tab="材料审查"></a-tab-pane>
                <a-tab-pane key="申请信息" tab="申请信息"></a-tab-pane> -->
                <a-tab-pane key="环节流转记录" tab="环节流转记录"></a-tab-pane>
            </a-tabs>
        </div>
        <div v-show="activeKey == '材料审查'" class="personnel-selection-v">
            <materialReviewExamination ref="materialReviewExaminationRef" :key="materialReviewExaminationKey"/>
            <div style="display: flex;justify-content: center;margin-top: 10px;">
                <!-- <a-button class="blue-btn" type="primary" @click="completeAndCorrectClick('pushQyBqbzNotice')" icon="file-add">补齐补正</a-button> -->
                <a-button style="margin-left: 10px;" class="blue-btn" type="primary" @click="activeKey = '人员选派'" icon="arrow-right">下一步</a-button>
            </div>
        </div>
        <!-- <div class="planProduction-production-tabs" v-if="!currentRow.isTopTabs">
            <a-tabs type="card" v-model:activeKey="activeKey" @change="tabPaneChange">
                <a-tab-pane key="材料审查" tab="材料审查"></a-tab-pane>
                <a-tab-pane key="人员选派" tab="人员选派"></a-tab-pane>
                <a-tab-pane key="方案制定" tab="审评方案"></a-tab-pane>
                <a-tab-pane key="通知材料制作" tab="通知材料制作"></a-tab-pane>
                <a-tab-pane key="申请信息" tab="事项信息"></a-tab-pane>
                <a-tab-pane key="环节流转记录" tab="流转记录"></a-tab-pane>
            </a-tabs>
        </div> -->
        <div class="planProduction-production-content" >
            <div v-show="activeKey == '人员选派'" class="personnel-selection-v">
                <table border bordercolor="#d9d9d9" style="width: 100%; ">
                    <tr>
                        <td class="title-left-v">
                            <div style="display: flex;align-items: center;text-align: center;justify-content: center;">
                                <span v-if="currentRow.fhbsxzt == 1" class="production-tips-box" >*</span>
                                <span>事项名称</span>
                            </div>
                            
                        </td>
                        <td class="value-rigth-v">
                            <a-textarea 
                                v-if="currentRow.fhbsxzt == 1"
                                @blur="blurBasicField('事项名称','fsxmc')"
                                placeholder="请输入事项名称"
                                v-model:value="currentRow.fsxmc"
                                :autosize="{ minRows: 1, maxRows: 3 }"
                            ></a-textarea>
                            <span v-else>
                                {{ currentRow.fsxmc }}
                            </span>
                            
                        </td>
                        <td class="title-left-v">
                            <div style="display: flex;align-items: center;text-align: center;justify-content: center;">
                                <span class="production-tips-box">*</span>
                                <span>审评时间</span>
                            </div>
                        </td>
                        <td class="value-rigth-v" >
                            <a-range-picker
                            :key="inspectKey"
                            :allowClear="false"
                            :defaultValue="[
                                currentRow.fcykssj?moment(currentRow.fcykssj).format('YYYY-MM-DD'):'',
                                currentRow.fcyjssj?moment(currentRow.fcyjssj).format('YYYY-MM-DD'):'']" 
                            @change="onChangeInspect" />
                            <div v-if="!currentRow.fcykssj" style="color: #ed5565; padding-top: 5px;">请选择审评时间</div>
                        </td>
                        
                    </tr>
                    <tr>
                        <td class="title-left-v">
                            企业名称
                        </td>
                        <td class="value-rigth-v">{{ currentRow.fqymc }}</td>
                        <td class="title-left-v">
                            <div style="display: flex;align-items: center;text-align: center;justify-content: center;">
                                <span class="production-tips-box">*</span>
                                <span>审评地点</span>
                            </div>
                            
                        </td>
                        <td class="value-rigth-v">
                            <a-textarea 
                                @blur="blurBasicField('审评地点','fjcdd')"
                                placeholder="请输入审评地点"
                                v-model:value="currentRow.fjcdd"
                                :autosize="{ minRows: 1, maxRows: 10000 }"
                            ></a-textarea>
                        </td>
                    </tr>
                    <tr>
                        <td class="title-left-v">
                            <div style="display: flex;align-items: center;text-align: center;justify-content: center;">
                                <span v-if="currentRow.fhbsxzt == 1" class="production-tips-box">*</span>
                                <span>审评类型</span>
                            </div>
                        </td>
                        <td class="value-rigth-v" >
                            <a-textarea 
                                v-if="currentRow.fhbsxzt == 1"
                                @blur="blurBasicField('审评类型','fjclx')"
                                placeholder="请输入审评类型"
                                v-model:value="currentRow.fjclx"
                                :autosize="{ minRows: 1, maxRows: 3 }"
                            ></a-textarea>
                            <span v-else>
                                {{ currentRow.fjclx }}
                            </span>
                        </td>
                        
                        <td class="title-left-v">
                            <div style="display: flex;align-items: center;text-align: center;justify-content: center;">
                                <span class="production-tips-box">*</span>
                                <span>审评内容</span>
                            </div>
                        </td>
                        <td class="value-rigth-v">
                            <a-textarea 
                                @blur="blurBasicField('审评内容','fcyjcfw')"
                                placeholder="请输入审评内容"
                                v-model:value="currentRow.fcyjcfw"
                                :autosize="{ minRows: 1, maxRows: 10000 }"
                            ></a-textarea>
                        </td>
                    </tr>
                    <tr>
                        <td class="title-left-v">
                            <div style="display: flex;align-items: center;text-align: center;justify-content: center;">
                                <span>注册地址</span>
                            </div>
                            
                        </td>
                        <td class="value-rigth-v">
                            <a-textarea 
                                @blur="blurBasicField('注册地址','fqyzszcdz')"
                                placeholder="请输入注册地址"
                                v-model:value="currentRow.fqyzszcdz"
                                :autosize="{ minRows: 1, maxRows: 3 }"
                            ></a-textarea>
                            
                        </td>
                        <td class="title-left-v">
                            <div style="display: flex;align-items: center;text-align: center;justify-content: center;">
                                <span>生产地址</span>
                            </div>
                            
                        </td>
                        <td class="value-rigth-v">
                            <a-textarea 
                                @blur="blurBasicField('生产地址','fxxdz')"
                                placeholder="请输入生产地址"
                                v-model:value="currentRow.fxxdz"
                                :autosize="{ minRows: 1, maxRows: 3 }"
                            ></a-textarea>
                            
                        </td>
                    </tr>
                </table>
                <a-collapse v-model:activeKey="activeKeyArr" class="tabs-collapse-box" style="margin-top: 15px;">
                    <a-collapse-panel key="1" header="人员抽选">
                        <table border bordercolor="#d9d9d9" style="width: calc(100% - 0px); margin-bottom: 10px;">
                            <tr>
                                <td class="title-left-v">
                                    预设组长人数
                                </td>
                                <td class="value-rigth-v">
                                    <a-input-number style="width: 102px;" placeholder="预设组长人数" v-model:value="currentRow.fzzrs" :min="0" :precision="0" @blur="saveData('fzzrs',currentRow.fzzrs)" />
                                </td>
                                <td class="title-left-v">
                                    预设组员人数
                                </td>
                                <td class="value-rigth-v">
                                    <a-input-number style="width: 102px;" placeholder="预设组员人数" v-model:value="currentRow.fzyrs" :min="0" :precision="0" @blur="saveData('fzyrs',currentRow.fzyrs)"/>
                                </td>
                                <td class="title-left-v">
                                    预设预备审评员人数
                                </td>
                                <td class="value-rigth-v">
                                    <a-input-number style="width: 102px;" placeholder="预设预备审评员人数" v-model:value="currentRow.fybrs" :min="0" :precision="0" @blur="saveData('fybrs',currentRow.fybrs)"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="title-left-v">
                                    人员随机抽选
                                </td>
                                <td class="value-rigth-v" style="text-align: left;" >
                                    <a-button size="small" class="green-l-btn" type="primary" @click="personnelRandomSelectionClick('Registered','随机已报名人员')">人员随机抽选</a-button>
                                </td>
                                <!-- 原 -->
                                <!-- <td class="title-left-v">
                                    预报名随机抽选
                                </td>
                                <td class="value-rigth-v" style="text-align: center;" >
                                    <a-button size="small" class="green-l-btn" type="primary" @click="newRandomlySelectPeople('Registered','随机已报名人员')">随机已报名人员</a-button>
                                </td> -->

                                <!-- @click="newRandomlySelectPeople('Registered','随机已报名人员')" -->
                                <!-- <div>
                                        
                                        <a-button size="small" class="blue-btn" type="primary" 
                                        style="margin-left: 10px;" v-if="registrationStatus == '0'" @click="initiateRegistration()">发起报名</a-button>
                                        <a-button size="small" class="blue-btn" type="primary" 
                                        style="margin-left: 10px;" v-if="registrationStatus == '1'" @click="endRegistration()">结束报名</a-button>
                                        <a-button size="small" class="blue-btn" type="primary" 
                                        style="margin-left: 10px;" v-if="registrationStatus == '1' || registrationStatus == '2' " @click="registrationDetails()">报名详情</a-button>
                                     </div> -->

                                <!-- 原 -->
                                <!-- <td class="title-left-v">
                                    手动随机抽选
                                </td>
                                <td class="value-rigth-v" style="text-align: center;">
                                    <a-button size="small" class="green-l-btn" type="primary" @click="newRandomlySelectPeople('All','随机全部人员')">随机全部人员</a-button>
                                </td> -->
                                <td class="title-left-v">
                                    手动指定
                                </td>
                                <td class="value-rigth-v" style="text-align: left;" colspan="3">
                                    <a-button size="small" class="green-l-btn" type="primary" @click="designatedPersonnel()">指定人员</a-button>
                                </td>
                            </tr>
                            <!-- <tr v-if="autoXpryYwxxList.length">
                                <th class="title-left-v rycx-th">组长人数</th>
                                <th class="title-left-v rycx-th">组员人数</th>
                                <th class="title-left-v rycx-th">预备审评员人数</th>
                                <th class="title-left-v rycx-th">回避区域</th>
                                <th class="title-left-v rycx-th">专业特长</th>
                                <th class="title-left-v rycx-th">执行状态</th>
                            </tr>
                            <tr v-if="autoXpryYwxxList.length">
                                <td class="rycx-td">{{ autoXpryYwxxList[0].fzzrs }}</td>
                                <td class="rycx-td">{{ autoXpryYwxxList[0].fzyrs }}</td>
                                <td class="rycx-td">{{ autoXpryYwxxList[0].fybrs }}</td>
                                <td class="rycx-td">{{ autoXpryYwxxList[0].hbqy }}</td>
                                <td class="rycx-td">{{ autoXpryYwxxList[0].zytc }}</td>
                                <td class="rycx-td">{{ autoXpryYwxxList[0].fstate=='0'?'执行中':(autoXpryYwxxList[0].fstate=='1'?'已结束':'') }}</td>
                            </tr> -->
                        </table>
                        <div style="margin-bottom: 10px;display: flex;justify-content: flex-end;margin-right: 3px;">
                            <a-button v-if="rsData.wczt && rsData.rybgzt" size="small" class="green-l-btn" type="primary" style="margin-left: 20px;" @click="UpdateMaterialsClick(0)">完成抽选</a-button>
                            <a-button v-else disabled size="small" type="primary" style="margin-left: 20px;">完成抽选</a-button>
                            <a-button size="small" class="blue-btn" type="primary" style="margin-left: 20px;" @click="selectedPersonnelRecordClick('抽选条件记录')">抽选条件记录</a-button>
                            <a-button size="small" class="blue-btn" type="primary" style="margin-left: 20px;" @click="selectedPersonnelRecordClick('抽选人员记录')">抽选人员记录</a-button>
                        </div>
                        <a-collapse v-model:activeKey="activeKeyArr" class="tabs-collapse-box">
                            <!-- <div style="display: flex;" class="rycx-collapse-box" v-if="xsCxrBox">
                                <div style="width: 50%;"  v-if="isDqr"> -->
                                    <a-collapse v-model:activeKey="activeKeyArr" class="tabs-collapse-box">
                                        <a-collapse-panel key="2" header="待确认抽选人员" v-if="isDqr">
                                            <div class="ry-record-box">
                                                <div class="ry-item-box">
                                                    <span class="item-title">组长：</span>
                                                    <span class="item-text">已同意</span>
                                                    <span class="num-box">{{rsData.tyFzzrs}}</span>
                                                    <span class="item-text">人</span>、
                                                    <span class="item-text">缺</span>
                                                    <span class="num-box hs-box">{{rsData.orgFzzrs - rsData.tyFzzrs}}</span>
                                                    <span class="item-text">人</span>
                                                    <!-- <span class="item-text">正确认</span>
                                                    <span class="num-box ls-box">{{rsData.xpFzzrs  - rsData.tyFzzrs}}</span>
                                                    <span class="item-text">人</span>、
                                                    <span class="item-text">需确认</span>
                                                    <span class="num-box hs-box">{{rsData.orgFzzrs}}</span>
                                                    <span class="item-text">人</span> -->
                                                </div>
                                                <div class="ry-item-box">
                                                    <span class="item-title">组员：</span>
                                                    <span class="item-text">已同意</span>
                                                    <span class="num-box">{{rsData.tyFzyrs}}</span>
                                                    <span class="item-text">人</span>、
                                                    <span class="item-text">缺</span>
                                                    <span class="num-box hs-box">{{rsData.orgFzyrs - rsData.tyFzyrs}}</span>
                                                    <span class="item-text">人</span>
                                                    <!-- <span class="item-text">正确认</span>
                                                    <span class="num-box ls-box">{{rsData.xpFzyrs  - rsData.tyFzyrs}}</span>
                                                    <span class="item-text">人</span>、
                                                    <span class="item-text">需确认</span>
                                                    <span class="num-box hs-box">{{rsData.orgFzyrs}}</span>
                                                    <span class="item-text">人</span> -->
                                                </div>
                                                <div class="ry-item-box">
                                                    <span class="item-title">预备审评员：</span>
                                                    <span class="item-text">已同意</span>
                                                    <span class="num-box">{{rsData.tyFybrs}}</span>
                                                    <span class="item-text">人</span>、
                                                    <span class="item-text">缺</span>
                                                    <span class="num-box hs-box">{{rsData.orgFybrs - rsData.tyFybrs}}</span>
                                                    <span class="item-text">人</span>
                                                    <!-- <span class="item-text">正确认</span>
                                                    <span class="num-box ls-box">{{rsData.xpFybrs  - rsData.tyFybrs}}</span>
                                                    <span class="item-text">人</span>、
                                                    <span class="item-text">需确认</span>
                                                    <span class="num-box hs-box">{{rsData.orgFybrs}}</span>
                                                    <span class="item-text">人</span> -->
                                                </div>
                                            </div>
                                            <!-- commonqueryJcyTyXpList -->
                                            <commpVxeTable
                                                :key="refreshTable"
                                                ref="headmanVxeTable"
                                                :isCanWrap="true"
                                                :config="tableToBeConfirmedConfig" 
                                                :columns="tableToBeConfirmedColumnsVxe1" 
                                                :formItem="[]"
                                                :adaptiveHeight="true"
                                            >
                                                <template v-slot:externalOperations="{row}">
                                                    <vxe-form-item>
                                                        <template>
                                                            
                                                        </template>
                                                    </vxe-form-item>
                                                    <vxe-form-item>
                                                        <template>
                                                            <a-button class="blue-btn" type="primary" @click="confirmSMSClick({},'确认短信模板')">确认短信模板</a-button>
                                                        </template>
                                                    </vxe-form-item>
                                                </template>
                                                <template v-slot:fgzdw_default="{row}" >
                                                    <span v-if="row.fsfyjsry == '是'" style="padding: 0 5px;background-color: #ff9200;color: #fff">药检</span>
                                                    {{ row.fgzdw }}
                                                </template>
                                                <template v-slot:fjcyxm_default="{row}" data-desc="姓名">
                                                    <span style="padding-right: 21;" v-if="row.fjcyxm&&row.fjcyxm.length == 2">
                                                        <span v-for="(trem,tI) in row.fjcyxm.split('')" :key="tI" >
                                                            {{trem}}
                                                            <span v-if="tI+1 !== row.fjcyxm.split('').length">&nbsp;&nbsp;</span>
                                                        </span>
                                                    </span>
                                                    <span style="padding-right: 21;" v-else>{{ row.fjcyxm }}</span>
                                                </template>
                                                <template v-slot:fssk_default="{row}" data-desc="所属库">
                                                    <span style="padding-right: 21;" v-if="row.fssk&&row.fssk.length == 2">
                                                        <span v-for="(trem,tI) in row.fssk.split('')" :key="tI" >
                                                            {{trem}}
                                                            <span v-if="tI+1 !== row.fssk.split('').length">&nbsp;&nbsp;</span>
                                                        </span>
                                                    </span>
                                                    <span style="padding-right: 21;" v-else>{{ row.fssk }}</span>
                                                </template>
                                                <template v-slot:fssqy_default="{row}" data-desc="所属区域">
                                                    <span style="padding-right: 21;" v-if="row.fssqy&&row.fssqy.length == 2">
                                                        <span v-for="(trem,tI) in row.fssqy.split('')" :key="tI" >
                                                            {{trem}}
                                                            <span v-if="tI+1 !== row.fssqy.split('').length">&nbsp;&nbsp;</span>
                                                        </span>
                                                    </span>
                                                    <span style="padding-right: 21;" v-else>{{ row.fssqy }}</span>
                                                </template>
                                                <template v-slot:fxpfs_default="{row}">
                                                    <div>
                                                        <img v-if="row.fxpfs == '自动循环抽选'" style="height: 25px;width: 25px;" src="../../../../../assets/sx-zd-xr.png" alt="">
                                                        <span>{{ row.fxpfs }}</span>
                                                    </div>
                                                    <div style="color: red;">
                                                        {{ row.fdqrjzsj }}
                                                    </div>
                                                    
                                                </template>
                                                <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                                    <a-form layout="inline" class="search-form" style="text-align: left;">
                                                        <a-form-item >
                                                            <a-button class="blue-btn dMould-btn" type="primary" @click="personnelSelectResult(row,'同意')" >同意</a-button>
                                                        </a-form-item>
                                                        <a-form-item >
                                                            <a-button class="orange-btn dMould-btn" type="primary" @click="personnelSelectResult(row,'不同意')" >不同意</a-button>
                                                        </a-form-item>
                                                        <a-form-item v-if="(row.fxpfs !== '自动循环抽选' && row.fsmszt == '否') || (row.fxpfs !== '自动循环抽选' && row.fsmszt == '否')">
                                                            <a-button
                                                             :disabled="(row.fssk == '组长' && !rsData.zzFlag) || (row.fssk == '组员' && !rsData.zyFlag) || (row.fssk == '预备审评员' && !rsData.ybFlag)"
                                                             :class="(row.fssk == '组长' && !rsData.zzFlag) || (row.fssk == '组员' && !rsData.zyFlag) || (row.fssk == '预备审评员' && !rsData.ybFlag)?'':'green-btn'" 
                                                             type="primary" @click="confirmSMSClick(row,'发送短信')">发送短信</a-button>
                                                        </a-form-item>
                                                    </a-form>
                                                </template>
                                            </commpVxeTable>
                                        </a-collapse-panel>
                                    </a-collapse>
                                <!-- </div>
                                <div style="flex: 1;"> -->
                                    <a-collapse v-model:activeKey="activeKeyArr" class="tabs-collapse-box">
                                        <a-collapse-panel key="3" header="已同意抽选人员">
                                            <div style="padding: 0px;">
                                                <commpVxeTable
                                                    :key="refreshTable"
                                                    ref="headmanVxeTable"
                                                    :isCanWrap="true"
                                                    :config="dataTableConfig" 
                                                    :columns="tableToBeConfirmedColumnsVxe2" 
                                                    :formItem="[]"
                                                    :adaptiveHeight="true"
                                                    
                                                >
                                                    <template v-slot:fjcyxm_default="{row}" data-desc="姓名">
                                                        <span style="padding-right: 21;" v-if="row.fjcyxm&&row.fjcyxm.length == 2">
                                                            <span v-for="(trem,tI) in row.fjcyxm.split('')" :key="tI" >
                                                                {{trem}}
                                                                <span v-if="tI+1 !== row.fjcyxm.split('').length">&nbsp;&nbsp;</span>
                                                            </span>
                                                        </span>
                                                        <span style="padding-right: 21;" v-else>{{ row.fjcyxm }}</span>
                                                    </template>
                                                    <template v-slot:fgzdw_default="{row}" >
                                                        <span v-if="row.fsfyjsry == '是'" style="padding: 0 5px;background-color: #ff9200;color: #fff">药检</span>
                                                        {{ row.fgzdw }}
                                                    </template>
                                                    <template v-slot:fssk_default="{row}" data-desc="所属库">
                                                        <span style="padding-right: 21;" v-if="row.fssk&&row.fssk.length == 2">
                                                            <span v-for="(trem,tI) in row.fssk.split('')" :key="tI" >
                                                                {{trem}}
                                                                <span v-if="tI+1 !== row.fssk.split('').length">&nbsp;&nbsp;</span>
                                                            </span>
                                                        </span>
                                                        <span style="padding-right: 21;" v-else>{{ row.fssk }}</span>
                                                    </template>
                                                    <template v-slot:fssqy_default="{row}" data-desc="所属区域">
                                                        <span style="padding-right: 21;" v-if="row.fssqy&&row.fssqy.length == 2">
                                                            <span v-for="(trem,tI) in row.fssqy.split('')" :key="tI" >
                                                                {{trem}}
                                                                <span v-if="tI+1 !== row.fssqy.split('').length">&nbsp;&nbsp;</span>
                                                            </span>
                                                        </span>
                                                        <span style="padding-right: 21;" v-else>{{ row.fssqy }}</span>
                                                    </template>
                                                    
                                                    <template v-slot:operation_btn="{row}" data-desc="自定操作栏" style="text-align: center;">
                                                        <a-form layout="inline" class="search-form" style="text-align: center;">
                                                            <a-form-item >
                                                                <a-button class="orange-btn dMould-btn" type="primary" @click="personnelSelectResult(row,'不同意')" >不同意</a-button>
                                                            </a-form-item>
                                                        </a-form>
                                                    </template>
                                                </commpVxeTable>
                                            </div>
                                        </a-collapse-panel>
                                    </a-collapse>
                                <!-- </div>
                            </div> -->
                            <!-- <a-collapse-panel key="4" header="监管部门">
                                <div>
                                    <a-button size="small" class="blue-btn btn-margin-mpp" type="primary" @click="selectInspector" style="margin: 0 10px;">选择</a-button>
                                    <span style="padding-left: 30px;" v-if="currentRow.fcygcybm">
                                        <span class="spector-title">单位名称：</span>
                                        <span>{{ currentRow.fcygcybm }}</span>
                                    </span>
                                    <span class="spector-title" v-if="!currentRow.fcygcy && !currentRow.fcygcybm">无</span>
                                </div>
                            </a-collapse-panel> -->
                               <!-- <a-collapse v-model:activeKey="activeKeyArr" class="tabs-collapse-box">
                                <a-collapse-panel key="1" header="审评组长选派">
                                    <commpVxeTable
                                        :key="refreshTable"
                                        ref="headmanVxeTable"
                                        :isCanWrap="true"
                                        :config="dataTableConfig" 
                                        :columns="columnsVxe" 
                                        :formItem="[]"
                                        :adaptiveHeight="true"
                                        
                                    >
                                        <template v-slot:fjcyxm_default="{row}" data-desc="姓名">
                                            <span style="padding-right: 21;" v-if="row.fjcyxm&&row.fjcyxm.length == 2">
                                                <span v-for="(trem,tI) in row.fjcyxm.split('')" :key="tI" >
                                                    {{trem}}
                                                    <span v-if="tI+1 !== row.fjcyxm.split('').length">&nbsp;&nbsp;</span>
                                                </span>
                                            </span>
                                            <span style="padding-right: 21;" v-else>{{ row.fjcyxm }}</span>
                                        </template>
                                        <template v-slot:fssqy_default="{row}" data-desc="所属区域">
                                            <span style="padding-right: 21;" v-if="row.fssqy&&row.fssqy.length == 2">
                                                <span v-for="(trem,tI) in row.fssqy.split('')" :key="tI" >
                                                    {{trem}}
                                                    <span v-if="tI+1 !== row.fssqy.split('').length">&nbsp;&nbsp;</span>
                                                </span>
                                            </span>
                                            <span style="padding-right: 21;" v-else>{{ row.fssqy }}</span>
                                        </template>
                                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏" style="text-align: center;">
                                            <a-form layout="inline" class="search-form" >
                                                <a-form-item >
                                                    <a-button class="orange-btn dMould-btn" type="primary" @click="personnelSelectResult(row,'不同意')" >不同意</a-button>
                                                </a-form-item>
                                            </a-form>
                                        </template>
                                    </commpVxeTable>
                                </a-collapse-panel>
                                <a-collapse-panel key="1" header="审评组员选派">
                                    <commpVxeTable
                                        :key="refreshTable"
                                        ref="headmanVxeTable"
                                        :config="memberConfig" 
                                        :columns="columnsVxe" 
                                        :isCanWrap="true"
                                        :formItem="[]"
                                        :adaptiveHeight="true"
                                    >
                                    
                                        <template v-slot:fjcyxm_default="{row}" data-desc="姓名">
                                            <span style="padding-right: 21;" v-if="row.fjcyxm&&row.fjcyxm.length == 2">
                                                <span v-for="(trem,tI) in row.fjcyxm.split('')" :key="tI" >
                                                    {{trem}}
                                                    <span v-if="tI+1 !== row.fjcyxm.split('').length">&nbsp;&nbsp;</span>
                                                </span>
                                            </span>
                                            <span style="padding-right: 21;" v-else>{{ row.fjcyxm }}</span>
                                        </template>
                                        <template v-slot:fssqy_default="{row}" data-desc="所属区域">
                                            <span style="padding-right: 21;" v-if="row.fssqy&&row.fssqy.length == 2">
                                                <span v-for="(trem,tI) in row.fssqy.split('')" :key="tI" >
                                                    {{trem}}
                                                    <span v-if="tI+1 !== row.fssqy.split('').length">&nbsp;&nbsp;</span>
                                                </span>
                                            </span>
                                            <span style="padding-right: 21;" v-else>{{ row.fssqy }}</span>
                                        </template>
                                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                            <a-form layout="inline" class="search-form" style="text-align: center;">
                                                <a-form-item >
                                                    <a-button class="orange-btn dMould-btn" type="primary" @click="personnelSelectResult(row,'不同意')" >不同意</a-button>
                                                </a-form-item>
                                            </a-form>
                                        </template>
                                    </commpVxeTable>
                                </a-collapse-panel>
                                <a-collapse-panel key="1" header="预备审评员选派">
                                    <commpVxeTable
                                        :key="refreshTable"
                                        ref="headmanVxeTable"
                                        :config="reservStaffConfig" 
                                        :columns="columnsVxe" 
                                        :isCanWrap="true"
                                        :formItem="[]"
                                        :adaptiveHeight="true"
                                    >
                                        <template v-slot:fjcyxm_default="{row}" data-desc="姓名">
                                            <span style="padding-right: 21;" v-if="row.fjcyxm&&row.fjcyxm.length == 2">
                                                <span v-for="(trem,tI) in row.fjcyxm.split('')" :key="tI" >
                                                    {{trem}}
                                                    <span v-if="tI+1 !== row.fjcyxm.split('').length">&nbsp;&nbsp;</span>
                                                </span>
                                            </span>
                                            <span style="padding-right: 21;" v-else>{{ row.fjcyxm }}</span>
                                        </template>
                                        <template v-slot:fssqy_default="{row}" data-desc="所属区域">
                                            <span style="padding-right: 21;" v-if="row.fssqy&&row.fssqy.length == 2">
                                                <span v-for="(trem,tI) in row.fssqy.split('')" :key="tI" >
                                                    {{trem}}
                                                    <span v-if="tI+1 !== row.fssqy.split('').length">&nbsp;&nbsp;</span>
                                                </span>
                                            </span>
                                            <span style="padding-right: 21;" v-else>{{ row.fssqy }}</span>
                                        </template>
                                        <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                            <a-form layout="inline" class="search-form" style="text-align: center;">
                                                <a-form-item >
                                                    <a-button class="orange-btn dMould-btn" type="primary" @click="personnelSelectResult(row,'不同意')" >不同意</a-button>
                                                </a-form-item>
                                            </a-form>
                                        </template>
                                    </commpVxeTable>
                                </a-collapse-panel>
                                
                            </a-collapse> -->
                        
                        </a-collapse>
                    </a-collapse-panel>
                </a-collapse>
            </div>
            <div v-if="activeKey == '审评方案拟定'" class="personnel-selection-v" :class="currentRow.isTopTabs?'personnel-selectionStyle':''" :style="{height:currentRow.rightPreviewBoxH?currentRow.rightPreviewBoxH+'px':'calc(100vh - 151px)'}">
                <div class="preparation-inspection-plan-v">
                    <div class="inspection-plan-v-left" :style="{height:currentRow.rightContentPreviewBoxH?currentRow.rightContentPreviewBoxH+'px':'calc(100vh - 174px)'}">
                        <table border bordercolor="#d9d9d9" style="width: 100%; margin-bottom: 10px;">
                            <tr v-for="(item,index) in noticeMaterialData" :key="index">
                                <td>
                                    <!-- <div v-if="item.name == '审评方案' && currentRow.fhbsxzt == 1" style="display: flex;justify-content: center;margin-bottom: 5px;">
                                        <a-button class="blue-btn" type="primary" @click="generatePlanClick()">选择事项生成审评方案</a-button>
                                    </div> -->
                                    <div style="display: flex;align-items: center;margin-bottom: 6px;">
                                        <span class="inspection-plan-name" v-if="item.name == '上一次符合性审评报告'" style="width: 160px !important;" >{{ item.name =='企业申报材料'? '审评参考材料': item.name =='审评报告模板'?'任务报告模板':item.name}}</span>
                                        <span class="inspection-plan-name" v-else >{{ item.name =='企业申报材料'? '审评参考材料': item.name =='审评报告模板'?'任务报告模板':item.name}}</span>
                                        <div style="display: flex;margin-left: 5px;justify-content: flex-end;flex: 1;">
                                            <!-- <a-button
                                            v-if="currentRow.fhbsxzt !== 1 && item.name == '企业申报材料' && !currentRow.isTopTabs"
                                            size="small"
                                            style="margin-right:15px;"
                                            class="ant-btn-background-ghost"
                                            type="primary" @click="selectApplicationFileChange(item.fileType,{nameList:item.name,...trem,index,tIndex:0})" ghost>
                                                选择材料
                                            </a-button> -->
                                            <!-- <a-button
                                            v-if="currentRow.fhbsxzt == 1 && item.name == '企业申报材料' && !currentRow.isTopTabs"
                                            size="small"
                                            style="margin-right:15px;"
                                            class="ant-btn-background-ghost"
                                            type="primary" @click="selectMultipleMattersChange(item.fileType,{nameList:item.name,...trem,index,tIndex:0})" ghost>
                                                选择材料
                                            </a-button> -->
                                            <!-- <a-button style="margin-right: 5px;" v-if="item.name == '审评报告模板' && !currentRow.isTopTabs" class="blue-btn" type="primary" @click="taskAllocationClick()">技术审评任务分配</a-button> -->
                                            <!-- <a-button
                                            v-if="currentRow.fhbsxzt !== 1 && (item.name == '审评方案' || item.name == '审评报告模板') && !currentRow.isTopTabs"
                                            size="small"
                                            class="ant-btn-background-ghost" 
                                            type="primary" @click="reSelectTemplate(item.fileType,{nameList:item.name,...trem,index,tIndex})" ghost>选择模板</a-button>
                                            <a-button v-if="currentRow.fhbsxzt == 1 && item.name == '审评方案' && !currentRow.isTopTabs" class="blue-btn" type="primary" @click="generatePlanClick(item.fileType)">制定审评方案</a-button>
                                            <a-button v-if="currentRow.fhbsxzt == 1 && item.name == '审评报告模板' && !currentRow.isTopTabs" class="blue-btn" type="primary" @click="developReportingTasksClick(item.fileType)">制定报告任务</a-button>
                                            <a-button
                                            v-if="item.name == '审评员函' && !currentRow.isTopTabs"
                                            size="small"
                                            class="ant-btn-background-ghost" 
                                            style="margin-right:15px;"
                                            type="primary" @click="activeKey = '人员选派'" ghost>调整人员</a-button> -->
                                            <!-- <a-upload v-if="item.name !== '审评报告模板' && item.name !== '审评方案' && !currentRow.isTopTabs" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.fileType,{nameList:item.name,...trem,index,tIndex:0})">
                                                <a-button
                                                size="small"
                                                class="ant-btn-green-l-ghost" 
                                                type="primary" ghost >上传</a-button>
                                            </a-upload> -->
                                            
                                            
                                        </div>
                                    </div>
                                    <div class="inspection-plan-fileList">
                                        <div
                                        v-for="(trem,tIndex) in item.fileList" 
                                        :key="tIndex" class="inspection-plan-for" 
                                        >
                                            <span
                                             class="fwjxsmc-text-box" 
                                             :class="'item'+index+'trem'+tIndex == 'item'+preparationOfInspectionData.index+'trem'+preparationOfInspectionData.tIndex?'select-inspection-trem':''"
                                             @click="selectPreparationOfInspection({nameList:item.name,...trem,index,tIndex})"
                                            >
                                                <a>{{ trem.fwjxsmc?(trem.fwjxsmc+trem.fwjlx):trem.fclmc }}</a>
                                                <!-- <a-upload
                                                 v-if="item.name !== '审评报告模板' && !currentRow.isTopTabs"  
                                                 :beforeUpload="$event=>{return false}" 
                                                 :showUploadList="false" action="" 
                                                 @change="singleUploadCahnge($event,item.fileType,{nameList:item.name,...trem,index,tIndex})">
                                                    <a-icon type="upload" style="display: inline-block;margin: 0 5px;color: #5ca3e5;font-size: 18px;"/>
                                                </a-upload> -->
                                                <!-- <a-button
                                                    size="small"
                                                    v-if="item.name == '审评报告模板' && !currentRow.isTopTabs"
                                                    style="margin: 0 5px;"
                                                    class="ant-btn-green-l-ghost" 
                                                    type="primary" ghost 
                                                    @click.stop="adjustingProjectClick(trem,item)"
                                                >
                                                    调整审评项目
                                                </a-button> -->
                                                <!-- <a-icon
                                                 v-if="!(item.name == '审评方案' && currentRow.fhbsxzt !== 1)  && !(item.name == '企业申报材料' && trem.fsfzxsc !== '是') && !currentRow.isTopTabs" 
                                                 type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin: 0 5px;color: #ed5565;font-size: 18px;" @click="producerDelete({
                                                    nameList:item.name,...trem,index,tIndex
                                                })"/>
                                                <a-icon v-if="item.name == '企业申报材料' && trem.fsfzxsc !== '是' && !currentRow.isTopTabs" type="minus-circle" class="toolbox-delete-icon-type" style="display: inline-block;margin: 0 5px;color: #ed5565;font-size: 18px;" @click="producerDelete({
                                                    nameList:item.name,...trem,index,tIndex
                                                })"/> -->
                                            </span>
                                        </div>
                                        <!-- {{ item.fileList }} -->
                                        
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="inspection-plan-v-right" >
                        <div v-show="preparationOfInspectionData.nameList == '企业申报材料'" id="wholeWatermarkId" ref="wholeWatermarkRef"></div>
                        <!-- <div style="margin-bottom: 5px;" v-if="preparationOfInspectionData.fwjlx4 !== '手动上传' && preparationOfInspectionData.nameList !== '企业申报材料' && !currentRow.isTopTabs">
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="refreshFile(preparationOfInspectionData)">刷新</a-button>
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="downloadFiles(preparationOfInspectionData)">下载</a-button>
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" v-if="preparationOfInspectionData.fwjlx == '.pdf'" @click="reEdit(preparationOfInspectionData)">重新编辑</a-button>
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" v-if="preparationOfInspectionData.fwjlx !== '.pdf'" @click="saveFiles(preparationOfInspectionData)">保存</a-button>
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" v-if="preparationOfInspectionData.fwjlx !== '.pdf'" @click="generatePDFClick(preparationOfInspectionData)">生成PDF</a-button>
                        </div>
                        <div v-else>
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="downloadFiles(preparationOfInspectionData)">下载</a-button>
                        </div> -->
                        <iframe
                            v-if="iframeSrc"
                            :key="iframeKey"
                            :src="iframeSrc" 
                            ref="iframeServerEditingRef" 
                            scrolling="auto" 
                            width="100%"
                            :height="(currentRow.rightContentPreviewBoxH?currentRow.rightContentPreviewBoxH - 40:(windowInnerHeight -178 ))+'px'"
                            style="border: 0;object-fit: contain !important;"
                        ></iframe>
                        <div v-else style="display: flex;justify-content: center;margin-top: 20px;">
                            <a-empty description="暂无文件或文件发生错误！"/>
                        </div>
                    </div>
                </div>
            </div>
            <div v-show="activeKey == '方案制定'" class="personnel-selection-v" v-if="false">
                <a-spin size="large" :spinning="programSpinning" :key="programSpinningKey" tip="正在加载中...">
                    <div v-if="programData.id" :key="programSpinningKey">
                        <div>
                            <a-button
                            style="margin-right: 15px;" 
                            class="blue-btn" type="primary" 
                            @click="refreshFile">刷新</a-button>

                            <a-button
                            style="margin-right: 15px;" 
                            class="blue-btn" type="primary" 
                            @click="downloadFiles(programData,'fwjxsmc')">下载</a-button>

                            <a-button
                            v-if="programData.fwjlx == '.pdf'"
                            style="margin-right: 15px;" 
                            class="blue-btn" type="primary" 
                            @click="reEdit">重新编辑</a-button>

                            <a-button
                            v-if="programData.fwjlx !== '.pdf'"
                            style="margin-right: 15px;" 
                            class="blue-btn" type="primary" 
                            @click="saveFiles">保存</a-button>

                            <a-button
                            v-if="programData.fwjlx !== '.pdf'"
                            style="margin-right: 15px;" 
                            class="blue-btn" type="primary" 
                            @click="generatePDFClick">生成PDF</a-button>

                            <!-- <a-button
                            v-if="programData.fwjlx == '.pdf'"
                            style="margin-right: 15px;" 
                            class="blue-btn" type="primary" 
                            @click="stampClick">盖章</a-button>

                            <a-button
                            v-if="programData.fwjlx !== '.pdf'"
                            style="margin-right: 15px;"
                            class="blue-btn" type="primary" 
                            @click="generatePDFStampClick">生成PDF并盖章</a-button> -->

                            <a-button 
                            v-if="programData.fwjlx !== '.pdf'"
                            class="blue-btn" type="primary" 
                            @click="reSelectTemplate">重新选择模板</a-button>
                        </div>
                        <div :key="iframeKey" style="display: flex;justify-content: center;" >
                            <iframe 
                                v-if="iframeSrc"
                                :key="iframeKey"
                                :src="iframeSrc" 
                                ref="iframeServerEditingRef" 
                                scrolling="auto" 
                                width="100%"
                                :height="(windowInnerHeight -140 )+'px'"
                                style="border: 0;object-fit: contain !important;"
                            ></iframe>
                            <span v-else>当前文件发生错误，请刷新！</span>
                        </div>
                    </div>
                    <div v-else >
                        <span style="color: red;font-weight: 600;">(注：当前暂无方案制定文件，请先选择模板进行方案制定)</span>
                        <selectTemplateNoModel
                         ref="selectTemplateNoModelRef" 
                         @selectTemplateComplete="selectTemplateComplete" 
                         @programSpinningChange="programSpinningChange" />
                    </div>
                </a-spin>
            </div>
            <div v-show="activeKey == '通知材料制作'" class="personnel-selection-v" v-if="false">
                <table border bordercolor="#d9d9d9" style="width: 100%; " :key="noticeMaterialKey" class="notice-material-v">
                    <tr>
                        <th style="width: 160px;">材料目录</th>
                        <th>文件</th>
                        <th style="width: 195px;">操作</th>
                    </tr>
                    <tr v-for="(item,index) in noticeMaterialData" :key="index">
                        <td style="text-align: center;">{{ item.name }}</td>
                        <td >
                            <div class="file-for-box">
                                <div style="display: flex;flex-wrap: wrap;">
                                    <div v-for="(trem,tIndex) in item.fileList" class="toolbox-fileList-box"
                                    style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                        
                                        <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                            <a-tooltip placement="rightBottom">
                                                <template slot="title">
                                                <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                </template>
                                                <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                            </a-tooltip>
                                            
                                        </div>
                                        <div class="fileList-icon-btn" style="flex: none;">
                                            <a-icon class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;" type="form" @click="editClick(trem)" v-if="trem.fwjlx4 !== '手动上传'"/>
                                            <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                            <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                            <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                        </div>
                                    </div>
                                </div>
                                <!-- <div v-for="(trem,tIndex) in item.fileList" class="toolbox-fileList-box" :key="tIndex">
                                    <div class="fileList-icon-btn">
                                        <span class="left-icon-btn">
                                            <a-icon type="delete" class="toolbox-delete-icon-type" @click="producerDelete(trem)"/>
                                            <a-icon type="eye" class="toolbox-eye-icon-type" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                        </span>
                                        <a-icon type="file-pdf" class="toolbox-filePdf-icon-type" />
                                        <span class="right-icon-btn">
                                            <a-icon class="fileicon-v" type="form" @click="editClick(trem)" v-if="trem.fwjlx4 !== '手动上传'"/>
                                            <a-icon type="download" class="toolbox-download-icon-type" @click="downloadFiles(trem)"/>
                                        </span>
                                    </div>
                                    <div class="toolbox-file-coontern">
                                        <a-tooltip placement="rightBottom">
                                            <template slot="title">
                                            <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                            </template>
                                            <span class="toolbox-file-name"><a href="#">{{ trem.fwjxsmc+trem.fwjlx}}</a></span>
                                        </a-tooltip>
                                        
                                    </div>
                                </div> -->
                                <!-- <div class="file-for-v" v-for="(trem,tIndex) in item.fileList" :key="tIndex">
                                    <a @click="downloadFiles(trem)" class="name-fclmc-text">{{ trem.fwjxsmc+trem.fwjlx }}</a>
                                    <div class="file-icon-box">
                                        <div class="right-box">
                                            <a-upload v-if="trem.fwjlx4 !== '手动上传'" style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="producerUpload($event,trem)">
                                                <a-icon class="fileicon-v" type="upload" />
                                            </a-upload>
                                            <a-icon class="fileicon-v" type="eye" @click="viewClick(trem)" v-if="trem.fwjlx == '.pdf'" />
                                            <a-icon class="fileicon-v" type="download" @click="downloadFiles(trem)"/>
                                        </div>
                                        <div class="right-box">
                                            <a-icon class="fileicon-v" type="form" @click="editClick(trem)" v-if="trem.fwjlx4 !== '手动上传'"/>
                                            <a-icon class="fileicon-v deleteicon-v" type="delete" @click="producerDelete(trem)"/>
                                        </div>
                                        <a-icon class="file-icon-v" type="file-pdf" />
                                        
                                    </div>
                                    
                                </div> -->
                            </div>
                        </td>
                        <td>
                            <a-button
                            class="blue-btn" 
                            style="margin-right: 5px;margin-bottom: 5px;"
                            type="primary" @click="initWjjlServe(item.fileType)">生成记录</a-button>

                            <a-button
                            style="margin-bottom: 5px;"
                            class="blue-btn" 
                            type="primary" @click="selectFileCahnge(item.fileType)">选择模板</a-button>

                            <a-upload style="margin-right: 5px;margin-bottom: 5px;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.fileType)">
                                <a-button
                                class="blue-btn" 
                                type="primary">上传</a-button>
                            </a-upload>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center;">企业申报材料</td>
                        <td>
                            <div class="file-for-box">
                                <div style="display: flex;flex-wrap: wrap;">
                                    <div v-for="(trem,tIndex) in applicationMaterialsList" class="toolbox-fileList-box"
                                    style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                        <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                            <a-tooltip placement="rightBottom">
                                                <template slot="title">
                                                <span>{{ trem.fclmc }}</span>
                                                </template>
                                                <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fclmc }}</a></span>
                                            </a-tooltip>
                                            
                                        </div>
                                        <div class="fileList-icon-btn" style="flex: none;">
                                            <a-icon class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;" type="form" @click="editClick(trem)" v-if="trem.fwjlx4 !== '手动上传'"/>
                                            <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                            <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.fclmc.slice(trem.fclmc.lastIndexOf('.')) == '.pdf'"/>
                                            <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </td>
                        <td>
                            <a-button
                            style="margin-right: 5px;margin-bottom: 5px;"
                            class="blue-btn" 
                            type="primary" @click="selectApplicationFileChange()">选择申报过来的材料</a-button>
                            <a-upload style="margin-right: 5px;margin-bottom: 5px;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,'企业申报材料')">
                                <a-button
                                class="blue-btn" 
                                type="primary">上传</a-button>
                            </a-upload>
                        </td>
                    </tr>
                </table>
            </div>
            
            <div class="personnel-selection-v" v-if="activeKey == '申请信息'  || activeKey == '环节流转记录'" style="height: 100%;overflow: hidden;">
                <a-spin size="large" :spinning="modalSpinningPrice" tip="正在加载中...">
                    <eventSet :key="eventSetKey" ref="eventSetRef" @updatedSuccess="eventupdatedSuccess"/>
                </a-spin>
            </div>
        </div>
        
        <selectPage ref="selectPageRef" @successChange="successChange" @saveData="saveData" />
        <handlingOpinions ref="handlingOpinionsRef" @getInputOpinion="getInputOpinion"/>
        <selectInspectionBasis ref="selectInspectionBasisRef" @getInputOpinion="selectInspectionBasisChange"/>
        <!-- 选择模板 -->
        <selectTemplate ref="selectTemplateRef" @selectTemplateComplete="selectTemplateComplete"/>
        <serverEditingView ref="serverEditingViewRef" @refreshChange="$event=>{}"/>
        <serverEditing ref="serverEditingRef" @refreshChange="refreshChange"/>
        <selectApplicationFile ref="selectApplicationFileRef" @selectApplicationFileSuccess="selectApplicationFileSuccess" />
        <selectMultipleMatters ref="selectMultipleMattersRef" @selectApplicationFileSuccess="selectApplicationFileSuccess" />
        

        <!-- 随机选派 -->
        <automaticAssignmentConditions ref="automaticAssignmentConditionsRef" @AssignmentConditionsSuccess="AssignmentConditionsSuccess" />

        <!-- 填写原因 -->
        <fillFeason ref="fillFeasonRef" @fillFeasonSuccess="fillFeasonSuccess" />
        <!-- 指定人员抽选 -->
        <candidate ref="candidateRef" @candidateSuccessChange="candidateSuccessChange"/>
        <!-- 添加自动选派表单 -->
        <automaticSelectFrom ref="automaticSelectFromRef" @automaticSelectFromSuccess="automaticSelectFromSuccess" />
        <!-- 查看自动选派列表 -->
        <moreAutomaticList ref="moreAutomaticListRef" />
        <initiateRegistrationComp ref="initiateRegistrationCompRef" @initiateRegistrationSuccess="initiateRegistrationSuccess"/>
        <registeredDetails ref="registeredDetailsRef" />
        <selectionRecord ref="selectionRecordRef" />
        <randomlyRegistered ref="randomlyRegisteredRef" @AssignmentConditionsSuccess="AssignmentConditionsSuccess" />
        <confirmSMSModel ref="confirmSMSModelRef" @refreshTableSuccess="refreshTable = Date.now();getRSData();" @completeTheSelectionProcessClick="completeTheSelectionProcessClick"/>
        <multipleTaskPrompts ref="multipleTaskPromptsRef" @successChange="getPreparationOfInspectionPlan"/>
        <developReportingTasks ref="developReportingTasksRef" @successChange="developReportingTasksSuccess"/>
        <inspectionItems ref='inspectionItemsRef'/>
        <assignPersonnel ref="assignPersonnelRef" />
    </div>
</template>
<script>
import assignPersonnel from '../onSiteInspection/assignPersonnel.vue'
import randomlyRegistered from './randomlyRegistered.vue'
import selectApplicationFile from '../materialReview/selectApplicationFile.vue'
import selectMultipleMatters from '../materialReview/selectMultipleMatters.vue'
import selectTemplate from '@/components/selectTemplate/selectTemplate.vue'
import serverEditing from '@/components/comp-model-series/server-editing.vue'
import serverEditingView from '@/components/comp-model-series/server-editing-view'
import eventSet from '../taskAcceptance/eventSet.vue'
import assessCheckApi from './service/api'
import selectTemplateNoModel from '@/components/selectTemplate/selectTemplate-noModel.vue'
import blobType from '@/common/blobType'
import { degrees, PDFDocument, rgb, StandardFonts } from 'pdf-lib'
import fillFeason from './fillFeason.vue'
import initiateRegistrationComp from './initiateRegistrationComp.vue'
import selectionRecord from "./selectionRecord.vue";
import confirmSMSModel from './confirmSMSModel.vue'
import {
    spcyRsGcyqueryAllJgbm,
    mbzjqueryHbjcBgMl,
    spcyRsBhgzautoSlbhBySqsxId,
    spcysaveFlow,
    queryYwzdYwflContent,
    commonxpHcyByAuto,
    commonupdateXpHcyxx,
    commondeleteXpHcy,
    sendSmsByXpjlQr,
    spcygetJcfaFile,
    mbzjqueryjcbgMbList,
    webOfficeApiopenFile,
    openFileReadOnly,
    webOfficeApiopenQyFile,
    spcySqsxWjjlgetLocalFileById,
    spcydownloadQysqclById,
    againEditPdfOnlineFile,
    getWebOfficeDownloadFile,
    getDocxToPdf,
    pdfFileHcCa,
    getDocxToPdfAndGz,
    queryHcyXpList,
    commoninitWjjl,
    uploadPdfFileById,
    spcySqsxWjjldeleteFileById,
    spcyuploadSqsxFile,
    hbjcdeletUploadSqsxFile,
    spcyuploadQywjcl,
    commononeTouchHcyByAuto,
    spcyqueryKckWjclList,
    spcycancelSelectWjclKck,
    spcydeleteZxscQywjcl,
    spcydownloadQysqclFile,
    sqsxYwxxqueryAutoXpryYwxxList,
    sqsxYwxxverifyAutoXpryYwxxIsExists,
    ybmjhverifySqsxYbmzt,
    ybmjhqueryYbmRyList,
    ybmjhaddBmjh,
    ybmjhjsbm,
    initWjwccxrySctzh,
    commonqueryJcyTyXpList,
    sqsxYwxxtjEndZxzAutoXpryRwList,
    sqsxYwxxgetCxrySendDqrRyxx,
    sqsxYwxxgetYxprySlhzt,
    wjmbWebOfficeApiopenFile,
    wjmbWebOfficeApiopenFileRead,
    wjmbWebOfficeApigetWebOfficeDownloadFile,
    mbzjdeleteWjmbById,
} from './service/index'
import selectPage from './selectPage.vue'
import moment from 'moment'
import compSelector from '@/components/compSelector/compSelector'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import YchConstant from '@/api/YchConstant'
import materialReviewExamination from '../materialReview/examination.vue'
import automaticAssignmentConditions from './automaticAssignmentConditions.vue'
import store from '@/store'
import candidate from './modalPage/candidate.vue'
import automaticSelectFrom from './automaticSelectFrom.vue'
import moreAutomaticList from './moreAutomaticList.vue'
import registeredDetails from './registeredDetails.vue'
import multipleTaskPrompts from './multipleTaskPrompts.vue'
import developReportingTasks from './developReportingTasks.vue'
import inspectionItems from './inspectionItems.vue'
export default {
    components:{
        eventSet,
        selectPage,
        compSelector,
        commpVxeTable,
        selectTemplateNoModel,
        selectTemplate,
        serverEditingView,
        serverEditing,
        materialReviewExamination,
        selectApplicationFile,
        selectMultipleMatters,
        automaticAssignmentConditions,
        fillFeason,
        candidate,
        automaticSelectFrom,
        moreAutomaticList,
        initiateRegistrationComp,
        registeredDetails,
        selectionRecord,
        randomlyRegistered,
        confirmSMSModel,
        multipleTaskPrompts,
        inspectionItems,
        developReportingTasks,
        assignPersonnel,
    },
    props:{

    },
    data(){
        return{
            modalSpinningPrice:true,
            moment:moment,
            compSelectorkey:null,
            inspectKey:null,
            planProductionProductionKey:null,
            activeKey:'',
            eventSetKey:null,
            currentRow:{
                isTopTabs:true
            },
            accessValue:'自动选择',
            inspectorNum:{
                fzzrs:0,
                fzyrs:0,
                fybrs:0,
            },
            activeKeyArr:['1','2','3','4','5','6'],
            refreshTable:null,
            //待确认
            tableToBeConfirmedConfig:{
                api:assessCheckApi.commonqueryJcyTyXpList,
                rowId: 'id',
                fywflcode:'001002',
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'btyXpjlList',
                paramet:{
                }
            },
            tableToBeConfirmedColumnsVxe1:[
            // { 
            //     type: 'checkbox', 
            //     width: 60 ,
            // },
            {
                title: '姓名', //列头显示文字
                field: 'fjcyxm',
                width: 85,
                titleInterval:true,
                slots: {
                // 使用插槽模板渲染
                    header:'fjcyxm_header',
                    default:'fjcyxm_default',
                },
            },{
                title: '工作单位', //列头显示文字
                field: 'fgzdw',
                slots: {
                    default:'fgzdw_default',
                },
                // align:'left'
                // width:180,
            },{
                title: '所属库', //列头显示文字
                field: 'fssk',
                slots: {
                    default:'fssk_default',
                },
                // width:95,
            },{
                title: '所属区域', //列头显示文字
                field: 'fssqy',
                slots: {
                    default:'fssqy_default',
                },
                // width:115,
            },{
                title: '联系电话', //列头显示文字
                field: 'fjcylxdh',
                // width:115,
                // fsmszt
            },{
                title: '发送确认短信', //列头显示文字
                field: 'fsmszt',
                // width:115,
                // fsmszt
            },{
                title: '选择方式', //列头显示文字
                field: 'fxpfs',
                slots: {
                    default:'fxpfs_default',
                },
                // width:130,
            },{
                title: '确认抽选结果',
                field: 'id',
                slots: {
                // 使用插槽模板渲染
                default: 'operation_btn',
                },
                width:250,
                fixed:'right'
            }],
            tableToBeConfirmedColumnsVxe2:[
            // { 
            //     type: 'checkbox', 
            //     width: 60 ,
            // },
            {
                title: '姓名', //列头显示文字
                field: 'fjcyxm',
                width: 85,
                titleInterval:true,
                slots: {
                // 使用插槽模板渲染
                    header:'fjcyxm_header',
                    default:'fjcyxm_default',
                },
            },{
                title: '工作单位', //列头显示文字
                field: 'fgzdw',
                slots: {
                    default:'fgzdw_default',
                },
                // align:'left'
                // width:180,
            },{
                title: '所属库', //列头显示文字
                field: 'fssk',
                slots: {
                    default:'fssk_default',
                },
                // width:95,
            },{
                title: '所属区域', //列头显示文字
                field: 'fssqy',
                slots: {
                    default:'fssqy_default',
                },
                // width:115,
            },{
                title: '联系电话', //列头显示文字
                field: 'fjcylxdh',
                // width:115,
                // fsmszt
            },{
                title: '发送廉政短信时间', //列头显示文字
                field: 'fjctzdxsj',
                // width:115,
                // fsmszt
            },{
                title: '选择方式', //列头显示文字
                field: 'fxpfs',
                // width:130,
            },{
                title: '确认抽选结果',
                field: 'id',
                slots: {
                // 使用插槽模板渲染
                default: 'operation_btn',
                },
                width:148,
                fixed:'right'
            }],
            //组长
            dataTableConfig:{
                api:assessCheckApi.commonqueryJcyTyXpList,
                rowId: 'id',
                fywflcode:'001002',
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'tyXpjlList',
                paramet:{
                }
            },
            columnsVxe:[{ 
                type: 'checkbox', 
                width: 60 ,
            },{
                title: '姓名', //列头显示文字
                field: 'fjcyxm',
                width: 80,
                titleInterval:true,
                slots: {
                // 使用插槽模板渲染
                    header:'fjcyxm_header',
                    default:'fjcyxm_default',
                },
            },{
                title: '工作单位', //列头显示文字
                field: 'fgzdw',
                // align:'left'
                // width:180,
            },{
                title: '所属区域', //列头显示文字
                field: 'fssqy',
                slots: {
                    default:'fssqy_default',
                },
                width:115,
            },{
                title: '联系电话', //列头显示文字
                field: 'fjcylxdh',
                width:115,
            },{
                title: '选择方式', //列头显示文字
                field: 'fxpfs',
                width:130,
            },{
                title: '确认抽选结果',
                field: 'id',
                slots: {
                // 使用插槽模板渲染
                default: 'operation_btn',
                },
                width:148,
                fixed:'right',
                align:'center'
            }],
            //组员
            memberConfig:{
                api:assessCheckApi.commonqueryJcyTyXpList,
                rowId: 'id',
                fywflcode:'001002',
                height:10000,
                autoHidden:true,
                pageSize:100,
                listData:'zyXpjlList',
                paramet:{
                }
            },
            //预备审评员
            reservStaffConfig:{
                api:assessCheckApi.commonqueryJcyTyXpList,
                rowId: 'id',
                fywflcode:'001002',
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'ybXpjlList',
                paramet:{
                }
            },

            //方案制定
            programData:{},
            programSpinning:true,
            programSpinningKey:null,
            iframeSrc:'',
            iframeKey:null,

            //通知材料制作
            noticeMaterialKey:null,
            noticeMaterialData:[{
                name:'审评方案',
                fileType:'审评方案',
                listType:'jcfaList',
                fileList:[],
            },{
                name:'审评员函',
                fileType:'选派专家的函',
                listType:'xpxccydhList',
                fileList:[],
            },{
                name:'企业申报材料',
                fileType:'企业申报材料',
                listType:'qysbclList',
                fileList:[],
            },{
                name:'审评报告模板',
                fileType:'技术审评报告',
                listType:'jcbgmbList',
                fileList:[],
            }],
            materialReviewExaminationKey:null,

            //企业申报材料
            applicationMaterialsList:[],
            currentSelect:[],
            windowInnerHeight:window.innerHeight,

            //审评方案拟定
            preparationOfInspectionData:{},
            realname:store.getters.userInfo.realname,//获取用户名
            autoXpryYwxxList:[],
            autoXpKey:null,
            executionExists:'',
            registrationStatus:'',
            completeTheSelectionProcess:false,
            isDqr:false,
            xsCxrBox:false,
            rsData:{},
            reportList:[],
        }
    },
    watch:{

    },
    mounted(){
    },
    methods:{
        getData(row){
            //console.log('我是方案制定，显示了什么？',row)
            row.fcyhbqy = row.fcyhbqy && row.fcyhbqy.length?row.fcyhbqy.split(','):[]
            row.fcyzytc = row.fcyzytc && row.fcyzytc.length?row.fcyzytc.split(','):[]
            this.currentRow = row
            this.dataTableConfig.paramet = {sqsxid:row.sqsxid}
            this.tableToBeConfirmedConfig.paramet = {sqsxid:row.sqsxid}
            this.memberConfig.paramet = {sqsxid:row.sqsxid}
            this.reservStaffConfig.paramet = {sqsxid:row.sqsxid}
            this.getBgMlData()
            this.programMemakeChange(this.currentRow)
            this.getNoticeMaterial(this.currentRow)
            this.getMaterialReviewExamination(false)
            //console.log('row.noFirstLoad',row.noFirstLoad)
            if(!row.noFirstLoad){
                this.activeKey = row.isActiveKey?row.isActiveKey:'审评方案拟定'
                this.planProductionProductionKey = Date.now()
                // this.compSelectorkey = Date.now()
                this.refreshTable = Date.now()
                this.materialReviewExaminationKey = Date.now()
            }
            //console.log(this.activeKey)
            this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'])
            if(this.activeKey == '人员选派'){
                this.getAutomaticSelectionData()
            }
            this.getCommonqueryJcyTyXpList()
            this.getRSData()
        },
        getBgMlData(){
            // if(this.currentRow.fhbsxzt == 1){
                mbzjqueryHbjcBgMl({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.reportList = res.result.records
                    }else{
                        this.reportList = []
                    }
                })
            // }
        },
        getRSData(){
            sqsxYwxxgetYxprySlhzt({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('查询预设人员的数量',res)
                    this.rsData = res.result
                }else{

                }
            })
        },
        getCommonqueryJcyTyXpList(){
            this.xsCxrBox = false
            commonqueryJcyTyXpList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('所以这个列表输出了什么？',res)
                    this.isDqr = res.result.btyXpjlList.length
                    this.completeTheSelectionProcess = res.result.btyXpjlList.length?false:true
                }
                this.xsCxrBox = true
            })
        },
        //人员随机抽选
        personnelRandomSelectionClick(type){
            this.$refs.randomlyRegisteredRef.getData({
                randomlyType:type,
                modalTitle:'人员随机',
                sqsxid:this.currentRow.sqsxid,
                kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
            },{
                fzzrs:this.currentRow.fzzrs,
                fzyrs:this.currentRow.fzyrs,
                fybrs:this.currentRow.fybrs,
            })
            this.$refs.randomlyRegisteredRef.visible = true
        },
        //人员选派
        newRandomlySelectPeople(type,name){//随机选人--已报名：Registered，全部：All
            if(!this.currentRow.fcykssj || !this.currentRow.fcyjssj){
                this.$message.warning('请先选择审评时间')
                return
            }
            if(type == 'All'){
                this.$refs.automaticAssignmentConditionsRef.getData({
                    randomlyType:type,
                    modalTitle:name,
                    sqsxid:this.currentRow.sqsxid,
                    kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                    jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
                })
                this.$refs.automaticAssignmentConditionsRef.visible = true
            }else{
                this.$refs.randomlyRegisteredRef.getData({
                    randomlyType:type,
                    modalTitle:name,
                    sqsxid:this.currentRow.sqsxid,
                    kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                    jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
                })
                this.$refs.randomlyRegisteredRef.visible = true
            }
            
        },
        AssignmentConditionsSuccess(row){//随机选择完后回调
            this.refreshTable = Date.now()
            this.getRSData()
            this.getCommonqueryJcyTyXpList()
        },
        designatedPersonnel(){//指定人员
            if(!this.currentRow.fcykssj || !this.currentRow.fcyjssj){
                this.$message.warning('请先选择审评时间')
                return
            }
            this.$refs.fillFeasonRef.getData({
                type:'指定人员',
                modalTitle:'抽选指定人员原因',
                okText:'抽选指定人员',
                messageText:'抽选指定人员原因',
                sqsxid:this.currentRow.sqsxid,
            })
            this.$refs.fillFeasonRef.visible = true
        },
        candidateSuccessChange(row){//成功选择指定人员后
            this.$refs.fillFeasonRef.visible = false
            this.$refs.fillFeasonRef.qrsfVisible = false
            this.refreshTable = Date.now()
            this.getRSData()
            this.getCommonqueryJcyTyXpList()
        },

        getAutomaticSelectionData(){//获取自动抽选列表
            commonqueryJcyTyXpList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.completeTheSelectionProcess = res.result.btyXpjlList.length?false:true
                }else{
                    this.completeTheSelectionProcess = false
                }
            })
            sqsxYwxxqueryAutoXpryYwxxList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.autoXpryYwxxList = res.result.records
                    sqsxYwxxverifyAutoXpryYwxxIsExists({sqsxid:this.currentRow.sqsxid}).then(res=>{
                        if(res.code == 200){
                            this.executionExists = res.result?'执行中':'结束'
                        }else{
                            this.executionExists = ''
                        }
                    })
                }else{
                    this.autoXpryYwxxList = []
                }
                this.autoXpKey = Date.now()
            })
            this.getApplicationData()
        },
        getApplicationData(){//获取报名状态
            ybmjhverifySqsxYbmzt({sqsxid:this.currentRow.sqsxid}).then(res=>{//查看报名状态
                if(res.code == 200){
                    this.registrationStatus = res.result
                }else{
                    this.registrationStatus = ''
                }
            })
        },
        initiateRegistration(){//发起报名
            this.$refs.initiateRegistrationCompRef.getData(this.currentRow)
            this.$refs.initiateRegistrationCompRef.visible = true
        },
        initiateRegistrationSuccess(){//报名成功回调
            this.getApplicationData()
        },
        endRegistration(){//结束报名
            var that = this
            this.$confirm({
                title:'您确认要结束结束报名吗？',
                onOk() {
                    ybmjhjsbm({sqsxid:that.currentRow.sqsxid}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getApplicationData()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        registrationDetails(){//报名详情
            this.$refs.registeredDetailsRef.getData({sqsxid:this.currentRow.sqsxid})
            this.$refs.registeredDetailsRef.visible = true
        },
        
        addAutomaticSelection(){//添加自动选派
            if(!this.currentRow.fcykssj || !this.currentRow.fcyjssj){
                this.$message.warning('请先选择审评时间')
                return
            }
            this.$refs.automaticSelectFromRef.getData({
                sqsxid:this.currentRow.sqsxid,
                kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
            },{
                fzzrs:this.currentRow.fzzrs,
                fzyrs:this.currentRow.fzyrs,
                fybrs:this.currentRow.fybrs, 
            })
            this.$refs.automaticSelectFromRef.visible = true
        },
        automaticSelectFromSuccess(){//添加自动选派后回调
            //console.log('添加自动选派后回调成功了')
            this.getAutomaticSelectionData()
            this.refreshTable = Date.now()
            this.getRSData()
            this.getCommonqueryJcyTyXpList()
        },
        endAutomaticSelection(){//结束自动选派
            var that = this
            this.$confirm({
                title:'您确认要结束自动选派吗？',
                onOk() {
                    sqsxYwxxtjEndZxzAutoXpryRwList({sqsxid:that.currentRow.sqsxid,xpjlid:that.autoXpryYwxxList[0].id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getAutomaticSelectionData()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        moreAutomaticList(){//查看自动选派列表
            this.$refs.moreAutomaticListRef.getData({sqsxid:this.currentRow.sqsxid})
            this.$refs.moreAutomaticListRef.visible = true
        },
        selectedPersonnelRecordClick(val){//抽选记录
            this.$refs.selectionRecordRef.getData({sqsxid:this.currentRow.sqsxid,modalTitle:val})
            this.$refs.selectionRecordRef.visible = true
        },
        //发送确认短信
        confirmSMSClick(row,type){
            this.$refs.confirmSMSModelRef.getData({
                sqsxid:this.currentRow.sqsxid,
                id:row.id,
                type:type,
                name:row.fjcyxm,
                kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
            })
            this.$refs.confirmSMSModelRef.visible = true
        },
        completeTheSelectionProcessClick(row){
            initWjwccxrySctzh({sqsxid:this.currentRow.sqsxid,...row}).then(res=>{
                if(res.code == 200){
                    this.getPreparationOfInspectionPlan(['通知材料'])
                    this.$message.success(res.message)
                    
                    this.$refs.confirmSMSModelRef.visible = false
                    this.refreshTable = Date.now()
                    this.getRSData()
                    this.getCommonqueryJcyTyXpList()
                    this.activeKey = '审评方案拟定'
                }else{
                    this.$message.warning(res.message)
                }
                this.$refs.confirmSMSModelRef.confirmLoading = false
            })
            
        },
        UpdateMaterialsClick(val){//更新材料
            if(val){
                this.activeKey = '人员选派'
            }else{
                this.$refs.confirmSMSModelRef.getData({
                    sqsxid:this.currentRow.sqsxid,
                    qfType:'success'
                })
                this.$refs.confirmSMSModelRef.visible = true
                // sqsxYwxxgetCxrySendDqrRyxx({sqsxid:this.currentRow.sqsxid}).then(res=>{
                //     if(res.code == 200){
                //         if(res.result){
                //             this.$refs.confirmSMSModelRef.getData({
                //                 sqsxid:this.currentRow.sqsxid,
                //                 qfType:'success'
                //             })
                //             this.$refs.confirmSMSModelRef.visible = true
                //         }else{
                //             this.completeTheSelectionProcessClick({})
                //         }
                //     }else{}
                // })
            }
            // if(this.completeTheSelectionProcess){
            //     this.$refs.confirmSMSModelRef.getData({
            //         sqsxid:this.currentRow.sqsxid,
            //         qfType:'success'
            //     })
            //     this.$refs.confirmSMSModelRef.visible = true
            //     // this.completeTheSelectionProcessClick()
            // }else{
            //     if(val){
            //         this.activeKey = '人员选派'
            //     }
            //     this.$message.warning('请先完成人员抽选确认')
            // }
        },
        //填写原因回调
        fillFeasonSuccess(row){
            if(row.type == '指定人员'){
                this.$refs.candidateRef.getData({fbz:row.opinion,sqsxid:this.currentRow.sqsxid,
                kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',})
                this.$refs.candidateRef.visible = true
            }else if(row.type == '不同意抽选'){
                this.getPersonnelSelectResult({id:row.dataRow.id,fsftyxp:'不同意',fbtyyy:row.opinion})
            }
            this.getAutomaticSelectionData()
        },
        personnelSelectResult(row,type){//确认抽选结果
            var that = this
            if(type == '同意'){
                this.$confirm({
                    title:'您确认要同意选派吗？',
                    onOk() {
                        that.getPersonnelSelectResult({id:row.id,fsftyxp:'同意'})
                        
                    },
                    
                });
            }else{
                this.$refs.fillFeasonRef.getData({
                    type:'不同意抽选',
                    modalTitle:'不同意抽选的原因',
                    messageText:'不同意抽选的原因',
                    dataRow:row,
                })
                this.$refs.fillFeasonRef.visible = true
            }
        },
        getPersonnelSelectResult(row){
            
            commonupdateXpHcyxx(row).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshTable = Date.now()
                    this.getRSData()
                    this.getCommonqueryJcyTyXpList()
                    this.$refs.fillFeasonRef.visible = false
                }else{
                    this.$message.warning(res.message)
                }
                this.getAutomaticSelectionData()
            })
        },


        //=============审评方案拟定========================
        async getPreparationOfInspectionPlan(val,csh){
            let arr = []
            if(val.indexOf('审评方案') !== -1){
                //审评方案
                await spcygetJcfaFile({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.programData = res.result.length?res.result[0]:{}
                        if(this.currentRow.fhbsxzt == 1){
                            this.noticeMaterialData[0].fileList = res.result.length?res.result:[]
                            if(res.result.length){
                                arr.push(...res.result)
                            }
                        }else{
                            //console.log('我刷新了2--方案制定',res.result)
                            this.noticeMaterialData[0].fileList = res.result.length?[res.result[0]]:[]
                            if(res.result.length){
                                arr.push(res.result[0])
                            }
                        }
                        
                        
                        // if(res.result.length){
                        //     if(this.programData.fwjlx == '.pdf'){
                        //         this.iframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.programData.id
                        //         this.iframeKey = Date.now()
                        //     }else{
                        //         this.openFileClick(this.programData)
                        //     }
                            
                        // }
                        // else{
                        //     this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'审评方案',val.sqsxid)
                        //     this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                        // }
                        
                    }
                })
            }
            if(val.indexOf('通知材料') !== -1){
                await queryHcyXpList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        //console.log('通知材料制作',res.result)
                        let data = res.result
                        for(let key in data){
                            this.noticeMaterialData.forEach((item,index)=>{
                                if(item.listType == key){
                                    this.noticeMaterialData[index].fileList = data[key]
                                }
                                if(data[key].length){
                                    arr.push(...data[key])
                                }
                            })
                        }
                        this.noticeMaterialKey = Date.now()
                    }else{
                        // this.$message.warning(res.message)
                    }
                    
                })
            }
            if(val.indexOf('企业申报材料') !== -1){
                await spcyqueryKckWjclList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.noticeMaterialData[2].fileList = res.result
                        //console.log('获取企业申报材料',res)
                        //console.log('获取企业申报材料',this.noticeMaterialData)
                        // this.applicationMaterialsList = res.result
                        // res.result.forEach((item,index)=>{
                        //     this.currentSelect.push(item.id)
                        // })
                        if(res.result.length){
                            arr.push(...res.result)
                        }
                    }else{
                        this.noticeMaterialData[2].fileList = []
                        // this.$message.warning(res.message)
                    }
                })
            }
            if(val.indexOf('审评报告模板') !== -1){
                await mbzjqueryjcbgMbList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        //console.log('获取审评报告模板',res)
                        this.noticeMaterialData[3].fileList = res.result
                        if(res.result.length){
                            arr.push(...res.result)
                        }
                    }else{
                        this.noticeMaterialData[3].fileList = []
                    }
                })
            }
            // if(!this.preparationOfInspectionData.id){
                if(arr.length){
                    if(!csh){
                        this.noticeMaterialData.forEach((item,index)=>{
                            //console.log('',item)
                            if(item.fileList.length && !this.preparationOfInspectionData.id){
                                this.preparationOfInspectionData = {
                                    ...item.fileList[0],
                                    nameList:item.name,
                                    index,
                                    tIndex:0
                                }
                                this.selectPreparationOfInspection(this.preparationOfInspectionData)
                                return
                            }else if(this.preparationOfInspectionData.index == index){
                                this.preparationOfInspectionData = {
                                    ...item.fileList[this.preparationOfInspectionData.tIndex],
                                    nameList:item.name,
                                    index,
                                    tIndex:this.preparationOfInspectionData.tIndex,
                                }
                                this.selectPreparationOfInspection(this.preparationOfInspectionData)
                            }
                        })
                    }else if(csh == '上传'){
                        
                        this.noticeMaterialData.forEach((item,index)=>{
                            if(this.preparationOfInspectionData.nameList == item.name){
                                //console.log('上传7777777',item.fileList[item.fileList.length - 1])
                                this.preparationOfInspectionData = {
                                    ...item.fileList[item.fileList.length - 1],
                                    nameList:item.name,
                                    index,
                                    tIndex:item.fileList.length - 1,
                                }
                                this.selectPreparationOfInspection(this.preparationOfInspectionData)
                            }
                            
                        })
                    }else if(csh == '删除'){
                        
                        this.noticeMaterialData.forEach((item,index)=>{
                            //console.log('刪除后刷新',this.preparationOfInspectionData.nameList,item.fileList.length,this.preparationOfInspectionData.nameList == item.name && item.fileList.length)
                            if(this.preparationOfInspectionData.nameList == item.name && item.fileList.length){
                                
                                this.preparationOfInspectionData = {
                                    ...item.fileList[0],
                                    nameList:item.name,
                                    index,
                                    tIndex:0
                                }
                                //console.log('我在删除1',this.preparationOfInspectionData)
                                this.selectPreparationOfInspection(this.preparationOfInspectionData)
                                return
                            }else if(this.preparationOfInspectionData.nameList == item.name && !item.fileList.length){
                                this.preparationOfInspectionData = {}
                                this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'])
                                return
                            }
                            
                            
                        })
                    }
                }else{
                    this.selectPreparationOfInspection({})
                }
                
            // }
            
        },
        //审评方案拟定--选择材料
        async selectPreparationOfInspection(row){
            this.preparationOfInspectionData = row
            //console.log(this.preparationOfInspectionData)
            if(row.id){

            
                if(this.preparationOfInspectionData.nameList == '企业申报材料'){
                    if(this.preparationOfInspectionData.fclmc.indexOf('.doc') !== -1 || this.preparationOfInspectionData.fclmc.indexOf('.docx') !== -1){
                        this.openFileClick(this.preparationOfInspectionData)
                    }else{
                        this.$nextTick(()=>{
                            this.$AddWatermarkHandle()
                        })
                        this.iframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcy/downloadQysqclFile?id='+this.preparationOfInspectionData.id
                        this.iframeKey = Date.now()
                        // const data = await spcydownloadQysqclFile({id:row.id})
                        // //console.log('我获取到了什么文件流？',data)
                        // const realnameDate = this.realname+moment().format('YYYY年MM月DD日')
                        // //console.log('水印文本',realnameDate)
                        // this.iframeSrc = ''
                        // this.previewPdfConstructor({
                        //     blob: data,
                        //     docTitle: 'window.open docTitle',
                        //     isAddWatermark: true, // 是否需要添加水印
                        //     watermark: { // watermark必填 里面可以不填
                        //         type: 'canvas',
                        //         text: realnameDate
                        //     }
                        // })
                    }
                    // this.iframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcy/downloadQysqclFile?id='+this.preparationOfInspectionData.id
                    // this.iframeKey = Date.now()
                }else{
                    if(this.preparationOfInspectionData.fwjlx == '.doc' || this.preparationOfInspectionData.fwjlx == '.docx'){
                        this.openFileClick(this.preparationOfInspectionData)
                    }else{
                        this.iframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.preparationOfInspectionData.id
                        this.iframeKey = Date.now()
                        
                    }
                }
            }else{
                this.iframeSrc = ''
                this.iframeKey = Date.now()
            }
            
        },
        previewPdfConstructor({ blob, docTitle, isAddWatermark = false, watermark: { type = 'text', text = 'WFT', image } }){
            const _self = this
            if(!blob) {
                return console.error('[PDF Blob Is a required parameter]')
            }
            if(!isAddWatermark) { // 不添加水印
                 _self.preRightView(blob, docTitle)
            } else {
                let bytes,imageType
                if(type == 'image') {
                    if(!image) {
                    return console.error('["image" Is a required parameter]')
                    }
                    bytes = image.bytes
                    imageType = image.imageType
                }
                const map = {
                    // 'text': _self.addTextWatermark.bind(_self),
                    // 'image': _self.addImageWatermark.bind(_self),
                    'canvas': _self.addCanvasWatermark.bind(_self)
                }
                const pdfDoc =  PDFDocument.load(blob)
                let params
                if(type == 'text') params = { blob, pdfDoc, text, docTitle }
                if(type == 'image') params = { blob, pdfDoc, bytes, imageType, docTitle }
                if(type == 'canvas') params = { blob, pdfDoc, text, docTitle }
                this.resultUrl = map[type](params)
            }
        },
        async addCanvasWatermark({ blob, pdfDoc1, text, docTitle }) {
            const pdfDoc =  await PDFDocument.load(blob)
            // 旋转角度大小
            const rotateAngle = Math.PI / 4;
        
            // labels是要显示的水印文字，垂直排列
            let labels = new Array();
            labels.push(text);
        
            const pages = pdfDoc.getPages()
        
            const size = pages[0].getSize()
        
            let pageWidth = size.width
            let pageHeight = size.height

            //console.log('画布的宽高，',size.width,'-',size.height)
            let canvas = document.createElement('canvas');
            let canvasWidth = canvas.width = pageWidth;
            let canvasHeight = canvas.height = pageHeight;
        
            const context = canvas.getContext('2d');
            context.font = "15px Arial";
        
            // 先平移到画布中心
            context.translate(pageWidth / 2, pageHeight / 2 - 250);
            // 在绕画布逆方向旋转30度
            context.rotate(-rotateAngle);
            // 在还原画布的坐标中心
            context.translate(-pageWidth / 2, -pageHeight / 2);
        
            // 获取文本的最大长度
            let textWidth = Math.max(...labels.map(item => context.measureText(item).width));
        
            let lineHeight = 15, fontHeight = 12, positionY, i
            i = 0, positionY = 0
            while (positionY <= pageHeight) {
            positionY = positionY + lineHeight * 5
            i++
            }
            canvasWidth += Math.sin(rotateAngle) * (positionY + i * fontHeight) // 给canvas加上画布向左偏移的最大距离
            //console.log('给canvas加上画布向左偏移的最大距离',Math.sin(rotateAngle) * (positionY + i * fontHeight))
            canvasHeight = 2 * canvasHeight
            for (positionY = 0, i = 0; positionY <= canvasHeight; positionY = positionY + lineHeight * 5) {
            // 进行画布偏移是为了让画布旋转之后水印能够左对齐;
            context.translate(-(Math.sin(rotateAngle) * (positionY + i * fontHeight)), 0);
            for (let positionX = 0; positionX < canvasWidth; positionX += 1.5 * textWidth) {
                let spacing = 0;
                labels.forEach(item => {
                context.fillText(item, positionX, positionY + spacing);        
                context.fillStyle = 'rgba(0, 0, 0, .2)'; // 字体颜色
                spacing = spacing + lineHeight;
                })
            }
            context.translate(Math.sin(rotateAngle) * (positionY + i * fontHeight), 0);
            context.restore();
            i++
            }
            // 图片的base64编码路径
            let dataUrl = canvas.toDataURL('image/png');
            // 使用Xhr请求获取图片Blob
            let xhr = new XMLHttpRequest();
            xhr.open("get", dataUrl, true);
            xhr.responseType = "blob";
            xhr.onload = res => {
            const imgBlob = res.target.response
            // 获取Blob图片Buffer
            imgBlob.arrayBuffer().then(async buffer => {
                const pngImage = await pdfDoc.embedPng(buffer)
                for(let i = 0; i < pages.length; i++) {
                pages[i].drawImage(pngImage)
                }
                // 序列化为字节
                const pdfBytes = await pdfDoc.save()
                this.preView(pdfBytes, docTitle)
            })
            }
            xhr.send();
        },
        preView(stream, docTitle) {
            const blob = new Blob([stream], { type: 'application/pdf' });
            this.iframeSrc = URL.createObjectURL(blob);
            this.iframeKey = Date.now()
        },

        getMaterialReviewExamination(val){
            this.$nextTick(()=>{
                this.$refs.materialReviewExaminationRef.getData({sqsxid:this.currentRow.sqsxid,isTopTabs:true,isActiveKey:'材料审查',reserveBottom:64,isRefresh:val,fhjmc:this.currentRow.fhjmc})
            })
        },
        completeAndCorrectClick(val){
            this.$emit('completeAndCorrectChange',val)
        },
        eventupdatedSuccess(){
            this.modalSpinningPrice = false
        },
        tabPaneChange(val){
            if(val == '申请信息'  || val == '环节流转记录'){
                this.$nextTick(()=>{
                    this.$refs.eventSetRef.getDatas({...this.currentRow,tabPaneActiveKey:val,borderisFalse:true})
                    this.modalSpinningPrice = true
                })
                
            }
            if(val == '材料审查'){
                this.getMaterialReviewExamination(true)
            }
            if(val == '审评方案拟定'){
                this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'])
            }
            if(val == '人员选派'){
                this.getAutomaticSelectionData()
            }
        },
        //选择监管部门
        selectInspector(){
            this.$refs.selectPageRef.getData({...this.currentRow,modelTitle:'监管部门（观察员）',modelType:'modalPageSupervisor'})
            this.$refs.selectPageRef.visible = true
        },
        //选择审评时间
        onChangeInspect(val,val1){
            this.currentRow.fcykssj = val1[0]
            this.currentRow.fcyjssj = val1[1]
            let data = {
                fcykssj:val1[0],
                fcyjssj:val1[1],
            }
            this.saveData('','',data)
        },
        selectHandleChange(name,value){//业务类型
            this.saveData(name,value)
        },
        //获取受理编号
        numbering(){
            if(!this.currentRow.fjclx){
                this.$message.warning('请先选择业务类型')
            }else{
                spcyRsBhgzautoSlbhBySqsxId({fjclx:this.currentRow.fjclx}).then(res=>{
                    if(res.code == 200){
                        this.currentRow.fslbh = res.result.fslbh
                        this.saveData('fslbh',res.result.fslbh)
                    }else{
                        this.$message.warning(res.message)
                        this.successChange()
                    }
                })
            }
        },
        //审评依据
        inspectionBasis(){
            this.$refs.selectInspectionBasisRef.visible = true
            this.$refs.selectInspectionBasisRef.getData(
            {title:'审评依据',valueData:{...this.currentRow}})
        },
        selectInspectionBasisChange(val,row){
            this.saveData('fcyjcyj',val)
        },
        //审评范围
        blurBasicField(title,key){
            this.saveData(key,this.currentRow[key])
        },
        getBasicField(title,key){
            queryYwzdYwflContent({fzdlx1:title,sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.currentRow[key] = res.result.content?res.result.content:''
                    this.saveData(key,this.currentRow[key])
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //回避区域
        selectHandleChangeOny(name,value){
            //console.log(value)
            let data = value.length?value.join(','):''
            this.saveData(name,data)
        },
        

        //自动选择
        obtainInspector(list){
            
            if(this.currentRow.fcykssj && this.currentRow.fcyjssj){
                if(!this.inspectorNum.fzzrs && !this.inspectorNum.fzyrs && !this.inspectorNum.fybrs){
                    this.$message.warning('请先输入人数')
                    
                }else{
                    let data = {
                        sqsxid:this.currentRow.sqsxid,
                        hbqy:this.currentRow.fcyhbqy && this.currentRow.fcyhbqy.length?this.currentRow.fcyhbqy.join(','):'',
                        kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                        jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
                        zytc:this.currentRow.fcyzytc.length?this.currentRow.fcyzytc.join(','):'',
                        fzzrs:list[0].num,
                        fzyrs:list[1].num,
                        fybrs:list[2].num,
                        fusertype:'审评员',
                    }
                    commononeTouchHcyByAuto(data).then(res=>{
                        if(res.code == 200){
                            this.inspectorNum.fzzrs = 0
                            this.inspectorNum.fzyrs = 0
                            this.inspectorNum.fybrs = 0
                            this.$message.success(res.message)
                            this.refreshTable = Date.now()
                            this.getRSData()
                            this.getCommonqueryJcyTyXpList()
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                    // list.forEach(item=>{
                    //     let data= {
                    //         ...item,
                    //         sqsxid:this.currentRow.sqsxid,
                    //         // fssqy:num?this.currentRow.fspxzqy:that.currentRow.fcyxzqy,选择区域
                    //         hbqy:this.currentRow.fcyhbqy && this.currentRow.fcyhbqy.length?this.currentRow.fcyhbqy.join(','):'', 
                    //         kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                    //         jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
                    //         zytc:this.currentRow.fcyzytc.length?this.currentRow.fcyzytc.join(','):'',
                    //     }
                    //     commonxpHcyByAuto(data).then(res=>{
                    //         if(res.code == 200){
                    //             this.inspectorNum.fzzrs = 0
                    //             this.inspectorNum.fzyrs = 0
                    //             this.inspectorNum.fybrs = 0
                    //             this.$message.success(res.message)
                    //             this.refreshTable = Date.now()
                    //         }else{
                    //             this.$message.warning(res.message)
                    //         }
                    //     })
                    // })
                }
                
            }else{
                this.$message.warning('请先选择审评时间')
            }
            
        },
        //手动选择
        manualSelectionClick(val){
            if(this.currentRow.fcykssj && this.currentRow.fcyjssj){
                this.manualSelectionData={
                    fusertype:'审评员',
                    sqsxid:this.currentRow.sqsxid,
                    fssk:val,
                    kssj:this.currentRow.fcykssj?moment(this.currentRow.fcykssj).format('YYYY-MM-DD'):'',
                    jssj:this.currentRow.fcyjssj?moment(this.currentRow.fcyjssj).format('YYYY-MM-DD'):'',
                }
                this.$refs.selectPageRef.getData({...this.manualSelectionData,modelTitle:'请选择'+val,modelType:'candidate',width:1000})
                this.$refs.selectPageRef.visible = true
            }else{
                this.$message.warning('请先选择审评时间')
            }
            // 
            
        },
        //同意或不同意
        selectAgree(val,item){
            commonupdateXpHcyxx({sqsxid:this.currentRow.sqsxid,id:item.id,fsftyxp:item.fsftyxp,fbtyyy:item.fbtyyy}).then(res=>{
                if(res.code == 200){
                    this.$message.success('修改成功')
                    this.refreshTable = Date.now()
                    this.getRSData()
                    this.getCommonqueryJcyTyXpList()
                    this.$emit('reviseClick',{...this.currentRow,noFirstLoad:true})
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //不同意意见
        disagreeClick(row){
            this.$refs.handlingOpinionsRef.visible = true
            this.$refs.handlingOpinionsRef.getData(
            {title:'不同意意见',opinionType:'药品生产方案制定不同意意见',valueData:{...row,sqsxid:this.currentRow.sqsxid},isJudgeAfterClosing:false})
        },
        getInputOpinion(val,row){
            //console.log(val,row)
            commonupdateXpHcyxx({fbtyyy:val,id:row.id,sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshTable = Date.now()
                    this.getRSData()
                    this.getCommonqueryJcyTyXpList()
                    this.$refs.handlingOpinionsRef.handleCancel()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //审查组长或组员 列表删除
        deleteClick(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                onOk() {
                    commondeleteXpHcy({sqsxid:that.currentRow.sqsxid,xpjlid:val.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success('删除成功')
                            that.refreshTable = Date.now()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        //发送短息
        sendMessage(val){
            var that = this
            this.$confirm({
                title:'您确认要发送短信吗？',
                onOk() {
                    sendSmsByXpjlQr({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.refreshTable = Date.now()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        //编辑审评员
        editInspector(row){
            this.$refs.selectPageRef.getData({...this.currentRow,modelTitle:'编辑审评员--'+row.fjcyxm,modelType:'editorInspector',...row,id:row.fuserid,width:400})
            this.$refs.selectPageRef.visible = true
        },


        //-----------方案制定---------------
        programMemakeChange(val){
            return
            spcygetJcfaFile({sqsxid:val.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.programData = res.result.length?res.result[0]:{}
                    //console.log('我刷新了2--方案制定',res.result)
                    if(res.result.length){
                        if(this.programData.fwjlx == '.pdf'){
                            this.iframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.programData.id
                            this.iframeKey = Date.now()
                        }else{
                            this.openFileClick(this.programData)
                        }
                        
                    }else{
                        this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'审评方案',val.sqsxid)
                        this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                    }
                    
                }
                this.programSpinning = false
                // this.programSpinningKey = Date.now()
            })
        },
        
        
        openFileClick(val){//打开文件
            //console.log('打开文件的类型是什么',val)
            if(this.currentRow.isTopTabs){
                if(val.nameList == '审评报告模板'){
                    wjmbWebOfficeApiopenFileRead({id:val.id}).then(res=>{
                        if(res.code == 200){
                            this.iframeSrc = res.result.wordUrl
                            this.iframeKey = Date.now()
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }else{
                    openFileReadOnly({id:val.id}).then(res=>{
                        if(res.code == 200){
                            this.iframeSrc = res.result.wordUrl
                            this.iframeKey = Date.now()
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
            }else{
                if(val.nameList == '审评报告模板'){
                    wjmbWebOfficeApiopenFileRead({id:val.id}).then(res=>{
                        if(res.code == 200){
                            this.iframeSrc = res.result.wordUrl
                            this.iframeKey = Date.now()
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }else if(val.nameList == '企业申报材料'){
                    webOfficeApiopenQyFile({id:val.id}).then(res=>{
                        if(res.code == 200){
                            this.iframeSrc = res.result.wordUrl
                            this.iframeKey = Date.now()
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }else{
                    
                    // openFileReadOnly({id:val.id}).then(res=>{
                    //     if(res.code == 200){
                    //         this.iframeSrc = res.result.wordUrl
                    //         this.iframeKey = Date.now()
                    //     }else{
                    //         this.$message.warning(res.message)
                    //     }
                    // })
                    //webOfficeApiopenFile({id:val.id}).then(res=>{
                    //     if(res.code == 200){
                    //         this.iframeSrc = res.result.wordUrl
                    //         this.iframeKey = Date.now()
                    //     }else{
                    //         this.$message.warning(res.message)
                    //     }
                    // })
                    openFileReadOnly({id:val.id}).then(res=>{
                        if(res.code == 200){
                            this.iframeSrc = res.result.wordUrl
                            this.iframeKey = Date.now()
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
            }
        },

        refreshFile(obj){//刷新
            // //console.log('刷新',obj)
            // //console.log(this.preparationOfInspectionData)
            // if(obj.fwjlx == '.pdf'){
            //     this.iframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+obj.id
            //     this.iframeKey = Date.now()
            // }else{
            //     this.openFileClick(obj)
            // }
            this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'])
            
        },

        downloadFiles(val,name){//下载
            var that = this
            var fwjlx = val.fwjlx?val.fwjlx:val.fclmc.slice(val.fclmc.lastIndexOf('.'))
            let param = { fywflcode:'001002',id:val.id,sqsxid:this.currentRow.sqsxid}
            if(val.nameList == '企业申报材料'){
                spcydownloadQysqclById(param).then((data) => {
                    if (!data) {
                        that.$message.warning('文件下载失败')
                    return
                    }
                        let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(fwjlx)] }))
                        let link = document.createElement('a')
                        link.style.display = 'none'
                        link.href = url
                        //console.log('什么名字',name?val[name]:val.fwjxsmc?(val.fwjxsmc+val.fwjlx):(val.fwjccmc?(val.fwjccmc+val.fwjlx):val.fclmc))
                        link.setAttribute('download', name?val[name]:val.fwjxsmc?(val.fwjxsmc+val.fwjlx):(val.fwjccmc?(val.fwjccmc+val.fwjlx):val.fclmc) )
                        document.body.appendChild(link)
                        link.click()
                        document.body.removeChild(link) //下载完成移除元素
                        window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }else{
                spcySqsxWjjlgetLocalFileById(param).then((data) => {
                    if (!data) {
                        that.$message.warning('文件下载失败')
                    return
                    }
                        let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(fwjlx)] }))
                        let link = document.createElement('a')
                        link.style.display = 'none'
                        link.href = url
                        link.setAttribute('download', name?val[name]:val.fwjxsmc?(val.fwjxsmc+val.fwjlx):(val.fwjccmc?(val.fwjccmc+val.fwjlx):val.fclmc) )
                        document.body.appendChild(link)
                        link.click()
                        document.body.removeChild(link) //下载完成移除元素
                        window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }
            
        },
        
        reEdit(val){//重新编辑
            againEditPdfOnlineFile({id:val.id}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        saveFiles(val){//保存
            if(val.nameList == '审评报告模板'){
                wjmbWebOfficeApigetWebOfficeDownloadFile({id:val.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.refreshFile()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                getWebOfficeDownloadFile({id:val.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.refreshFile()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        
        generatePDFClick(val){//生成PDF
            getDocxToPdf({id:val.id}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile({...val,fwjlx:'.pdf'})
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        stampClick(val){//盖章
            pdfFileHcCa({id:val.id}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        generatePDFStampClick(val){//生成PDF并盖章
            getDocxToPdfAndGz({id:val.id}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        reSelectTemplate(type,row){//重新选择模板
            let data = {}
            if(this.noticeMaterialData[0].fileList.length){
                data = {
                    ...row,
                    selectFileSaveType:'selectWjmbServe',
                    id:this.noticeMaterialData[0].fileList[0].id,
                }
            }else{
                data = {
                    ...row,
                    selectFileSaveType:'commoninitWjjl',
                    id:'',
                }
            } 
            if(row.nameList == '审评报告模板'){
                data.selectFileSaveType = 'mbzjsaveSelectSqsxWjmb'
            }
            this.$refs.selectTemplateRef.getSelectTemplate(data,type,this.currentRow.sqsxid)
            this.$refs.selectTemplateRef.selectTemplateVisible = true
        },
        //选择模板
        selectTemplateComplete(val,row){
            //console.log('选择模板',val)
            // //console.log('我刷新了1',val)
            // if(val == '审评方案'){
            //     this.programMemakeChange(this.currentRow)
            //     //console.log('我刷新了2')
            // }else{
            //     this.getNoticeMaterial(this.currentRow)
            // }
            this.preparationOfInspectionData.nameList = row.nameList
            this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'上传')
            
        },
        programSpinningChange(){
            this.programSpinning = true
        },
        // -------通知材料制作-----
        getNoticeMaterial(row){
            return
            queryHcyXpList({sqsxid:row.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('通知材料制作',res.result)
                    let data = res.result
                    for(let key in data){
                        this.noticeMaterialData.forEach((item,index)=>{
                            if(item.listType == key){
                                this.noticeMaterialData[index].fileList = data[key]
                            }
                        })
                    }
                    this.noticeMaterialKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
                
            })
            this.getApplicationMaterials()
        },
        //企业申报材料
        getApplicationMaterials(){
            this.currentSelect = []
            spcyqueryKckWjclList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取企业申报材料',res)
                    this.applicationMaterialsList = res.result
                    res.result.forEach((item,index)=>{
                        this.currentSelect.push(item.id)
                    })
                    
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //删除或取消企业申报材料
        undeleteStatement(item,name){
            if(name == '删除'){
                var that = this
                this.$confirm({
                    title:'您确认要删除吗？',
                    // icon: createVNode(ExclamationCircleOutlined),
                    onOk() {
                        spcydeleteZxscQywjcl({id:item.id}).then(res=>{
                            if(res.code == 200){
                                that.$message.success(res.message)
                                that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'删除')
                            }else{
                                that.$message.warning(res.message)
                            }
                        })
                    }
                })

            }else{
                spcycancelSelectWjclKck({id:item.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'删除')
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        initWjjlServe(val,row){//生成记录
            commoninitWjjl({sqsxid:this.currentRow.sqsxid,type:val}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.preparationOfInspectionData.nameList = row.nameList
                    this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'上传')
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        selectFileCahnge(val,row){//选择模板
            this.$refs.selectTemplateRef.getSelectTemplate({selectFileSaveType:'commoninitWjjl',...row},val,this.currentRow.sqsxid)
            this.$refs.selectTemplateRef.selectTemplateVisible = true
        },
        //选择事项生成方案
        generatePlanClick(val){
            this.$refs.multipleTaskPromptsRef.getData(this.currentRow,val,'制定审评方案')
            this.$refs.multipleTaskPromptsRef.visible = true
        },
        developReportingTasksClick(val){
            this.$refs.developReportingTasksRef.getData(this.currentRow,val,'制定报告任务')
            this.$refs.developReportingTasksRef.visible = true
        },
        developReportingTasksSuccess(){
            this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'])
            this.getBgMlData()
        },
        taskAllocationClick(){
            this.$refs.assignPersonnelRef.visible = true
            this.$refs.assignPersonnelRef.getData(this.currentRow,this.reportList,this.currentRow.fhbsxzt)
        },
        //选择申报材料
        selectApplicationFileChange(){
            this.$refs.selectApplicationFileRef.getData({...this.currentRow,nameList:'企业申报材料'},this.currentSelect)
            this.$refs.selectApplicationFileRef.visible = true
        },
        //合并多事项选择申报材料
        selectMultipleMattersChange(){
            this.$refs.selectMultipleMattersRef.getData({...this.currentRow,nameList:'企业申报材料'},this.currentSelect)
            this.$refs.selectMultipleMattersRef.visible = true
        },
        selectApplicationFileSuccess(){
            this.preparationOfInspectionData.nameList = '企业申报材料'
            this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'上传')
        },
        //上传
        singleUploadCahnge({file},val,row){
            var that = this
            //console.log(val,row)
                const fileData = new FormData();
                fileData.append("file",file);
                fileData.append("sqsxid",this.currentRow.sqsxid);
                fileData.append("type",val);
                if(val == '企业申报材料'){
                    spcyuploadQywjcl(fileData).then(res => {
                        if(res.code !== 200){
                            that.$message.warning('请上传pdf文件或者联系管理员!')
                        }else{
                            that.preparationOfInspectionData = row
                            that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'上传')
                            that.$message.success('上传成功')
                        }
                        
                    })
                }else if(file.name.indexOf('.pdf') !== -1){
                     if(val == '审评方案'){
                    
                        fileData.append("fileid",row.id);
                        
                        hbjcdeletUploadSqsxFile(fileData).then(res => {
                            if(res.code !== 200){
                                that.$message.warning('请上传pdf文件或者联系管理员!')
                            }else{
                                that.preparationOfInspectionData = row
                                that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'上传')
                                that.$message.success('上传成功')
                            }
                            
                        })
                    }else{
                        spcyuploadSqsxFile(fileData).then(res => {
                            if(res.code !== 200){
                                that.$message.warning('请上传pdf文件或者联系管理员!')
                            }else{
                                that.preparationOfInspectionData = row
                                that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'上传')
                                that.$message.success('上传成功')
                            }
                            
                        })
                    }
                }else{
                    this.$message.warning('请上传pdf文件')
                }
        },
        adjustingProjectClick(trem,item){//调整审评项目
            this.$refs.inspectionItemsRef.getData(trem,item)
            this.$refs.inspectionItemsRef.visible = true
        },
        producerUpload({file},val){//
            var that = this
                // if(file.name.indexOf(".xls") !== -1 || file.name.indexOf(".xlsx") !==-1) {
            const fileData = new FormData();
            fileData.append("file",file);
            fileData.append("fywflcode",'001002');
            fileData.append("sqsxid",this.currentRow.sqsxid);
            fileData.append("id",val.id);
            uploadPdfFileById(fileData).then(res => {
                if(res.code !== 200){
                    that.$message.warning('请上传pdf文件或者联系管理员!')
                }else{
                    that.getNoticeMaterial(this.currentRow)
                    that.$message.success('上传成功')
                }
                
            })
        },
        editClick(val){
            this.$refs.serverEditingRef.getData(val)
        },
        refreshChange(){
            this.getNoticeMaterial(this.currentRow)
        },
        //删除
        producerDelete(val){
            //console.log(val)
            var that = this
            if(val.nameList == '企业申报材料'){
                if(val.fsfzxsc !== '是'){
                    this.$confirm({
                        title:'您确认要移除吗？',
                        // icon: createVNode(ExclamationCircleOutlined),
                        onOk() {
                            spcycancelSelectWjclKck({id:val.id}).then(res=>{
                                if(res.code == 200){
                                    that.$message.success(res.message)
                                    that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'删除')
                                }else{
                                    that.$message.warning(res.message)
                                }
                            })
                        }
                    })
                    
                }else{
                    this.$confirm({
                        title:'您确认要删除吗？',
                        // icon: createVNode(ExclamationCircleOutlined),
                        onOk() {
                            spcydeleteZxscQywjcl({id:val.id}).then(res=>{
                                if(res.code == 200){
                                    that.$message.success(res.message)
                                    that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'删除')
                                }else{
                                    that.$message.warning(res.message)
                                }
                            })
                        }
                    })
                }
            }else if(val.nameList == '审评报告模板'){
                this.$confirm({
                    title:'您确认要删除吗？',
                    // icon: createVNode(ExclamationCircleOutlined),
                    onOk() {
                        mbzjdeleteWjmbById({id:val.id}).then(res=>{
                            if(res.code == 200){
                                that.preparationOfInspectionData = val
                                that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'删除')
                                that.getBgMlData()
                                that.$message.success('删除成功')
                            }else{
                                that.$message.warning(res.message)
                            }
                        })
                    },
                    
                });
                
            }else{
                this.$confirm({
                    title:'您确认要删除吗？',
                    // icon: createVNode(ExclamationCircleOutlined),
                    onOk() {
                        spcySqsxWjjldeleteFileById({id:val.id}).then(res=>{
                            if(res.code == 200){
                                that.preparationOfInspectionData = val
                                that.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'],'删除')
                                that.$message.success('删除成功')
                            }else{
                                that.$message.warning(res.message)
                            }
                        })
                    },
                    
                });
            }
            
            
        },
        
        //查看pdf
        viewClick(val){
            this.$refs.serverEditingViewRef.getData({id:val.id,fwjlx:val.fwjlx})
            this.$refs.serverEditingViewRef.serverEditingVisible = true
        },

        //保存
        saveData(name,value,obj){
            let data = {
                jobid:this.currentRow.jobid,
                sqsxid:this.currentRow.sqsxid,
                opinion:'',
                smgflag:'否',
                map:{}
            }
            if(name){
                data.map[name] = value
            } else if(obj){
                data.map = {...obj}
            } else{
                data.map = { ...this.currentRow,}
            }
            spcysaveFlow(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.$refs.selectInspectionBasisRef.visible = false
                    if(name == 'fzzrs' || name == 'fzyrs' || name == 'fybrs'){
                        this.getRSData()
                    }
                }else{
                    this.$message.warning(res.message)
                }
                this.successChange()
            })
        },
        
        successChange(val){
            //console.log('到这里了吗？')
            if(val){
                this.refreshTable = Date.now()
                this.getRSData()
                this.getCommonqueryJcyTyXpList()
            }else{
                this.$emit('reviseClick',{...this.currentRow,noFirstLoad:true})
                this.refreshTable = Date.now()
                this.getRSData()
                this.getCommonqueryJcyTyXpList()
            }
            
        },
        verifySave(){
            if(this.currentRow.fcykssj && this.currentRow.fcyjssj){
                 return true
            }else{
                this.$message.warning('请先选择审评时间')
                return false
            }
        },
    }
}
</script>
<style lang="less">
//1
.planProduction-production{
    width: 100%;
    padding: 0 0px;
    // padding: 2px 5px 5px 5px;
    height: calc(100vh - 119px);
    overflow-y: hidden;
    // background-color: #f5f5f5 !important;
    // .planProduction-production-tabs{
    //     // padding: 0 5px;
    //     background-color: #f5f5f5;
    //     position: relative;
    //     // top: 48px;
    //     top: 0;
    //     right: 0;
    //     // margin:0 10px;
    //     font-size: 20px !important;
    //     font-weight: 600 !important;
    //     .ant-tabs-bar{
    //         margin: 5px 0;
    //     }
    //     .ant-tabs-nav .ant-tabs-tab{
    //         padding-top: 5px;
    //         padding-bottom: 5px;
    //         margin-right: 10px;
    //     }
    //     .ant-tabs-nav-container{
    //         height: 50px !important;
    //     }
    //     .ant-tabs-nav-scroll{
    //         padding-top: 10px;
    //         padding-left: 10px;
    //     }
    // }
    // .ant-tabs-tab-active{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    // }
    // .ant-tabs-tab{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    //     line-height: 28px !important;
    //     // color: #d4d3d3;
    //     border-color: #fff;
    //     border-radius: 10px 10px 0 0 !important;
    // }
    // .ant-tabs-tab-active{
    //     background-color: #5ca3e5 !important;
    //     color: #fff !important;
    //     border-color: #5ca3e5 !important;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
    // .planProduction-production-content{
    //     margin-top: 10px;
    //     height: calc(100vh - 145px);
    //     overflow-y: auto;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    //     // box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
}
//2
.planProduction-production{
    .personnel-selection-v{
        height: calc(100vh - 151px);
        // margin-top: 5px;
        // margin-left: 5px;
        background-color: #fff;
        // box-shadow: 0px 0px 12px 0px #5ca3e5;
        padding: 8px !important;
        border: 1px solid #38f;
        border-top: 0;
        overflow-y: auto;
        .ant-spin-nested-loading{
            height: calc(100vh - 170px);
        }
        .ant-collapse-content > .ant-collapse-content-box {
            padding: 3px;
            padding-top: 10px;
        }
        .title-left-v{
            text-align: center;
            width: 160px;
            font-weight: 600;
            font-size: 16px;
            background-color:#e6f7ff;
            font-family: simHei;
            color: rgba(0, 0, 0, 0.85);
            .production-tips-box{
                color: #ed5565;
                font-size: 14px;
                line-height: 30px;
                padding-right: 5px;
            }
        }
        .rycx-th{
            height: 40.8px;
            background-color: #dee5ed !important;
        }
        .value-rigth-emp{
            border: none !important;
        }
        .endAutomatic-selection-record{
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            .sm-title{
                font-weight: 600;
            }
            .endAutomatic-record-right{
                margin-right: 16px;
            }
            .endAutomatic-record-item{
                margin: 0 3px;
                display: flex;
                align-items: center;
                margin-right: 0px;
                flex-wrap: nowrap;
                .num-box{
                    border-radius: 50%;
                    display: inline-block;
                    margin-left: 3px;
                    // width: 28px;
                    height: 22px;
                    padding: 0 5px;
                    text-align: center;
                    line-height: 20px;
                    color: #1ab394;
                    border: 2px solid #1ab394;
                }
                .num-box-lan{
                    color: #229dfc;
                    border: 2px solid #229dfc;
                }
                .hpqy-zytc-box{
                    display: inline-block;
                    margin-left: 3px;
                    color: #ff9200;
                    border: 2px solid #ff9200;
                    padding: 0 5px;
                    border-radius: 15px;
                }
                .endAutomatic-fstate{
                    border: 2px solid #d9d9d9;
                    padding: 0 5px;
                    border-radius: 15px;
                    display: inline-block;
                    margin-left: 3px;
                }
                .zxz-box{
                    color: #66c24f;
                    border-color: #66c24f;
                }
                .yzs-box{
                    color: #ed5565;
                    border-color: #ed5565;
                    
                }
            }
        }
        .ry-record-box{
            margin-left: 15px;
            display: flex;
            justify-content: space-between;
            font-size: 16px;
            .ry-item-box{
                margin-right: 15px;
                .item-title{
                    font-weight: 600;
                }
                .item-text{

                }
                .num-box{
                    border-radius: 50%;
                    display: inline-block;
                    margin-left: 3px;
                    // width: 28px;
                    height: 22px;
                    padding: 0 5px;
                    text-align: center;
                    line-height: 20px;
                    color: #1ab394;
                    border: 2px solid #1ab394;
                }
                .hs-box{
                    color: #ff9200;
                    border: 2px solid #ff9200;
                }
                .ls-box{
                    color: #229dfc;
                    border: 2px solid #229dfc;
                }
            }
        }
        
        
        .rycx-td{
            height: 40.8px;
            text-align: center;
        }
        .btn-margin-mpp{
            // margin-top:3px;
            // margin-right: 15px;
        }
        
        .spector-title{
            font-weight: 600;
        }
        .value-rigth-v{
            padding: 5px 10px;
            font-size: 16px;
        }
        td{
            padding: 5px;
        }

        .preparation-inspection-plan-v{
            
            display: flex;
            .inspection-plan-v-left{
                width: 30%;
                padding: 5px;
                height: calc(100vh - 174px);
                
                overflow-y: auto;
                .inspection-plan-name{
                    font-weight: 600;
                    display: inline-block;
                    width: 128px;
                    font-size: 16px;
                    // margin-bottom: 5px;
                }
                .inspection-plan-fileList{
                    .inspection-plan-for{
                        // padding: 5px 0;
                        .fwjxsmc-text-box{
                            display: inline-block;
                            padding: 5px 5px;
                            margin: 0px 3px 3px 0;
                            border-radius: 15px;
                            border: 1px solid #d9d9d9;
                        }
                        .select-inspection-trem{
                            // background-color: #38f;
                            // padding: 5px;
                            // a{
                            //     color: #fff;
                            // }
                            background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
                            background-size: 100% 100% !important;
                            border: 2px solid #ff9200;
                        }
                    }
                }
                
                
            }
            .inspection-plan-v-right{
                flex: 1;
                padding-top: 5px;
            }
        }
    }
    .personnel-selectionStyle{
        border: none !important;
        padding: 0 !important;
    }
    .notice-material-v{
        th{
            padding: 10px;
            text-align: center;
        }
        td{
            padding: 5px;
        }
        .file-for-box{
            display: flex;
            flex-wrap: wrap;
            .toolbox-fileList-box{
                // width: 104px;
                height: 98px;
                margin: 10px;
                margin-left: 0;
                display: flex;
                flex-direction: column;
                justify-content: center;
                overflow: hidden;
                border: 1px solid #d9d9d9;
                .fileList-icon-btn{
                    flex: 1;
                    display: flex;
                    justify-content: space-around;
                    .toolbox-filePdf-icon-type{
                        font-size: 40px;
                        color: #229dfc;
                        display: inline-block;
                        margin-top: 8px;
                    }
                    .left-icon-btn,.right-icon-btn{
                        padding: 7px 0;
                        width: 15px;
                        display: flex;
                        flex-direction: column;
                        justify-content: space-between;
                    }
                    .toolbox-delete-icon-type{
                        color: #ed5565;
                    }
                    .toolbox-eye-icon-type{
                        color: #1ab394;
                        display: inline-block;
                        margin-top: 8px;
                    }
                    .toolbox-download-icon-type{
                        color: #229dfc;
                    }
                    .toolbox-upload-icon-type{
                        color: #229dfc;
                        display: inline-block;
                        margin-top: 8px;
                    }
                }
                .toolbox-file-coontern{
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    padding: 0 3px;
                    height: 42px;
                    .toolbox-file-name{
                        
                        flex: 1;
                        text-align: center;
                        display: -webkit-box;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        -webkit-line-clamp: 2; /* 控制最大行数 */
                        -webkit-box-orient: vertical;
                    }
                }
            }
        }
        .file-for-v{
            // width: 130px;
            // height: 130px;
            border-radius: 2px;
            border: 1px solid #d9d9d9;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            padding: 5px;
            margin: 5px;
            .file-icon-box{
                display: flex;
                justify-content: space-evenly;
                .file-icon-v{
                    font-size: 42px;
                    color: rgb(24, 144, 255);
                    padding: 7px 0;
                }
                .left-box{
                    // width: 28px;
                }
                .right-box{
                    display: flex;
                    flex-direction: row;
                    align-items:center;
                    padding-bottom: 2px;
                    .eye-icon-v{
                        font-size: 18px;
                        color: rgb(24, 144, 255);
                    }
                }
                .fileicon-v{
                    font-size: 18px;
                    // color: rgb(24, 144, 255);
                    color: #2F54EB;
                }
                .deleteicon-v{
                    color: #ed5565;
                }
            }
            
            .name-fclmc-text{
                height: 60px;
                text-align: center;
                display:block;
                text-overflow: -o-ellipsis-lastline;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                // display: flex;
                // flex-direction: column;
                // justify-content: center;
                -webkit-line-clamp: 3;
                line-clamp: 3;
                -webkit-box-orient: vertical;
                font-size: 14px;
            }
        }
    }
    
    iframe {
        html, body {
            margin: 0;
            padding: 0;
            width: 50% !important;
            // height: 100%;
            overflow: hidden;
        }

        body {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        width: 100%;
    }
    
}

.rycx-collapse-box{
    .ant-collapse{
        height: calc(100% - 10px);
    }
    .ant-collapse-item{
        height: 100%;
    }
    .ant-collapse-content{
        height: calc(100% - 46px);
    }
}
    
</style>